grass 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b327dd07017b0b13990495f3e6f3bd103249c77b
4
- data.tar.gz: d77ae3d10091e19e1ac888f1861916840f82a5ec
3
+ metadata.gz: 80273e5b97f98a379386a4b02e0a7000c5654ccd
4
+ data.tar.gz: a2570cc82c8634690c0300ac65b231f9ae99fc14
5
5
  SHA512:
6
- metadata.gz: 8666b49f18e2f7140f90492bb082c19012b2097ce322cf3f631453940acf0ad62c89e49a244285844d07c3c2770f552e589975614349c0134665029259a1e5ba
7
- data.tar.gz: 73af1d28ef19ab0c6a33784d93d437bcecf95aed34b844bd3e4b919d37425d4b88bbde17c87118929f737c449682300e5d26a1bd3bc22a1dccae8c2fab7123e1
6
+ metadata.gz: ba4d6c9828a89d9c6d8438e087dc5fb3ef12e61a7ac278e367af160767f8a4b4d2e769bced95c6b0eb925aa127a9f0a0e87d1c8a90cf9070faa625decf1b70cf
7
+ data.tar.gz: a7bbf7c2af4fcb8f638b5d69439418cde0eaa5cc3ee38f8893f8b9111c348136d7d156e43407e0d3a780c8faca3eae06d679a6578a0130bb9e5c67dba0ac1bdc
data/bin/grass CHANGED
@@ -42,7 +42,7 @@ command :push do |c|
42
42
 
43
43
  Grass.cache.flush
44
44
 
45
- files.delete_if{|file| file =~ /\/helpers\//}.each do |file|
45
+ files.keep_if{ |file| file =~ /\/assets|\/content|\/views/ }.each do |file|
46
46
 
47
47
  unless File.directory?(file)
48
48
  source = Grass::Source.find_or_create_by!(filepath: file)
@@ -1,16 +1,22 @@
1
1
  module Grass
2
2
  module Cache
3
3
 
4
- DATA_CACHE_KEYS = %i(language_info country_info params http_host request_path)
5
-
6
4
  module ClassMethods
7
5
 
6
+ def data_cache_keys
7
+ @@data_cache_keys ||= %i(language_info country_info params http_host request_path)
8
+ end
9
+
10
+ def data_cache_keys= keys
11
+ @@data_cache_keys = keys
12
+ end
13
+
8
14
  def read_cache cache_key
9
15
  JSON.load(Grass.cache.get(cache_key))
10
16
  end
11
17
 
12
18
  def generate_cachekey key_fullpath, data
13
- Digest::MD5.hexdigest("#{key_fullpath}_#{data.select{|k,v| DATA_CACHE_KEYS.include?(k)}}")
19
+ Digest::MD5.hexdigest("#{key_fullpath}_#{data.select{|k,v| self.data_cache_keys.include?(k)}}")
14
20
  end
15
21
 
16
22
  end
@@ -1,3 +1,3 @@
1
1
  module Grass
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,7 +1,8 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../', __FILE__)
2
2
  load "grass/tasks/db.rake"
3
3
  desc "pushes deployed file changes"
4
- task :deploy do
5
- system 'bundle exec grass push'
6
- end
7
- task :default => :deploy
4
+ namespace :grass do
5
+ task :push do
6
+ system 'bundle exec grass push'
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Onur Uyar