plant 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/guard/plant/templates/Guardfile +5 -0
- data/lib/guard/plant.rb +19 -0
- data/lib/plant/utils.rb +3 -3
- data/lib/plant/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c16f6767dc9eeca03cacc96a7500009dd319a8a8
|
4
|
+
data.tar.gz: a19820109d657fbe3020e5168e8a49181716380d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29ed803cdd5e2754d5223cbf90a849dcf7d413581e3d051a1fa3492193ebb512de0726480e11dda011befff520aadb6089248b4ad102260544dc902d59047242
|
7
|
+
data.tar.gz: b4e23412c12088c32b8427e9125e0db721b34cfe432e2ca53438317e6ad33a81544130c93d2cb49717a9ffbb91ad5ab35c2681fc130fedb928afee3ea75407a7
|
data/README.md
CHANGED
data/lib/guard/plant.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Guard
|
2
|
+
class Plant < Plugin
|
3
|
+
|
4
|
+
def run_on_additions(paths = [])
|
5
|
+
import_seeds(paths)
|
6
|
+
end
|
7
|
+
|
8
|
+
def run_on_modifications(paths = [])
|
9
|
+
import_seeds(paths)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def import_seeds(paths)
|
15
|
+
puts "Auto importing seeds"
|
16
|
+
system('bundle exec rake plant:seeds')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/plant/utils.rb
CHANGED
@@ -18,9 +18,9 @@ module Plant
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.load_all_yaml_files(dir = 'app/content')
|
21
|
-
Plant::Utils.yaml_files(dir).
|
22
|
-
Plant::Utils.load_yaml_file(fle)
|
23
|
-
end
|
21
|
+
Plant::Utils.yaml_files(dir).inject({}) do |memo, fle|
|
22
|
+
memo.merge(Plant::Utils.load_yaml_file(fle))
|
23
|
+
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/plant/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -178,6 +178,8 @@ files:
|
|
178
178
|
- db/migrate/20150820134825_create_plant_contents.rb
|
179
179
|
- lib/capistrano/plant.rb
|
180
180
|
- lib/capistrano/tasks/plant.rake
|
181
|
+
- lib/guard/plant.rb
|
182
|
+
- lib/guard/plant/templates/Guardfile
|
181
183
|
- lib/plant.rb
|
182
184
|
- lib/plant/engine.rb
|
183
185
|
- lib/plant/hash_pathify.rb
|