Skip to content

Commit b113ad5

Browse files
committed
Initial import
0 parents  commit b113ad5

File tree

9 files changed

+86
-0
lines changed

9 files changed

+86
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.gem
2+
.bundle
3+
Gemfile.lock
4+
pkg/*

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source "http://rubygems.org"
2+
3+
# Specify your gem's dependencies in guard-i18n.gemspec
4+
gemspec

Guardfile

Whitespace-only changes.

README.md

Whitespace-only changes.

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "bundler/gem_tasks"

guard-i18n.gemspec

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- encoding: utf-8 -*-
2+
$:.push File.expand_path("../lib", __FILE__)
3+
require "guard/guard-i18n/version"
4+
5+
Gem::Specification.new do |s|
6+
s.name = "guard-i18n"
7+
s.version = Guard::I18n::VERSION
8+
s.authors = ["Nicolas ZERMATI"]
9+
s.email = ["[email protected]"]
10+
s.homepage = ""
11+
s.summary = %q{Automatically generate js files from locales files.}
12+
s.description = %q{Automatically generate js files from locales files.}
13+
14+
# s.rubyforge_project = "guard-i18n"
15+
16+
s.files = Dir.glob('{lib}/**/*') #+ %w[README.md]
17+
s.require_path = ['lib']
18+
19+
# specify any dependencies here; for example:
20+
s.add_dependency "guard"
21+
end

lib/guard/guard-i18n.rb

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
require 'guard'
2+
require 'guard/guard'
3+
require "guard/guard-i18n/version"
4+
5+
module Guard
6+
class GuardI18n < Guard
7+
8+
# Initialize a Guard.
9+
# @param [Array<Guard::Watcher>] watchers the Guard file watchers
10+
# @param [Hash] options the custom Guard options
11+
def initialize(watchers = [], options = {})
12+
super
13+
end
14+
15+
# Call once when Guard starts. Please override initialize method to init stuff.
16+
# @raise [:task_has_failed] when start has failed
17+
def start
18+
end
19+
20+
# Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
21+
# @raise [:task_has_failed] when stop has failed
22+
def stop
23+
end
24+
25+
# Called when `reload|r|z + enter` is pressed.
26+
# This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
27+
# @raise [:task_has_failed] when reload has failed
28+
def reload
29+
end
30+
31+
# Called when just `enter` is pressed
32+
# This method should be principally used for long action like running all specs/tests/...
33+
# @raise [:task_has_failed] when run_all has failed
34+
def run_all
35+
end
36+
37+
# Called on file(s) modifications that the Guard watches.
38+
# @param [Array<String>] paths the changes files or paths
39+
# @raise [:task_has_failed] when run_on_change has failed
40+
def run_on_change(paths)
41+
puts paths
42+
end
43+
44+
# Called on file(s) deletions that the Guard watches.
45+
# @param [Array<String>] paths the deleted files or paths
46+
# @raise [:task_has_failed] when run_on_change has failed
47+
def run_on_deletion(paths)
48+
end
49+
50+
end
51+
end

lib/guard/guard-i18n/templates/Guardfile

Whitespace-only changes.

lib/guard/guard-i18n/version.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Guard
2+
module I18n
3+
VERSION = "0.0.1"
4+
end
5+
end

0 commit comments

Comments
 (0)