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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1942967aeeab9dd650cedace8e56a62da4af213
4
- data.tar.gz: 631ab72e1d8a5cb473c106637dfd37b2566fef77
3
+ metadata.gz: c16f6767dc9eeca03cacc96a7500009dd319a8a8
4
+ data.tar.gz: a19820109d657fbe3020e5168e8a49181716380d
5
5
  SHA512:
6
- metadata.gz: 2e52cc5327cd5d737bcf11d07325abc62d37b33ca817d617c8a227a1ddc478818fc5b0d4c50e9449e8746797cc823ad6dc927aaf0b027d8eb485de7dc6cc2618
7
- data.tar.gz: a6634e55098fd04029326430c5f24f548c757257f3f58ff485a1f734b464886f5e160627b38cc39eabc16151217a013fed50b99bd0d83affef84a0347fbfa302
6
+ metadata.gz: 29ed803cdd5e2754d5223cbf90a849dcf7d413581e3d051a1fa3492193ebb512de0726480e11dda011befff520aadb6089248b4ad102260544dc902d59047242
7
+ data.tar.gz: b4e23412c12088c32b8427e9125e0db721b34cfe432e2ca53438317e6ad33a81544130c93d2cb49717a9ffbb91ad5ab35c2681fc130fedb928afee3ea75407a7
data/README.md CHANGED
@@ -85,3 +85,5 @@ Before pushing back to the repo, make sure that all tests pass.
85
85
 
86
86
  ## Future features / Wish list
87
87
  - Use git to find diffs so don't have to load all content every time
88
+ - Allow only build certain yml files in rake task
89
+ - integration with Guard (after yml)
@@ -0,0 +1,5 @@
1
+ guard :plant do
2
+ require 'plant/utils'
3
+ files = Plant::Utils.yaml_files
4
+ files.each { |file| watch(file) }
5
+ end
@@ -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).map do |fle|
22
- Plant::Utils.load_yaml_file(fle)
23
- end.reduce({}, :merge)
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
@@ -1,4 +1,4 @@
1
1
  # Version file
2
2
  module Plant
3
- VERSION = '0.6.1'
3
+ VERSION = '0.7.0'
4
4
  end
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.6.1
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-24 00:00:00.000000000 Z
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