cartoonist-comics 0.0.20.2 → 0.0.20.3

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: 81584fee2fa1b2af6bfdc5a443244945f88c4c27
4
- data.tar.gz: f2b102d4804fbcee77835217ae982ab64d04d355
3
+ metadata.gz: de7ceec74043acc11bd1b62bc5452acd887db36d
4
+ data.tar.gz: d1822af31be37a5186862eeafb6aa5e1200772ee
5
5
  SHA512:
6
- metadata.gz: 6cd4418539f51d41087db83c52fa275b6e3f9f9e4c66824fe767c55b731b2981cba8276e6f597c371ed57ce505aaba76fb158392ceeb1b49e4f5cc375e0479b5
7
- data.tar.gz: 1c5b6987565af578df687f8174055793a6bb35994db6e6be799e80ea672b5dc352a8027b96b3e63fdbef78e1555ddf46e79d09846046b077e9f80e834e4fc885
6
+ metadata.gz: 6d700a64557d6ba75c78ec32cd0570bb8bd39d49009cabdadbe9c19694313cdf2db37efd12877ae86ef707da1516deadac0b339d5c836c14636f87714fe67a0c
7
+ data.tar.gz: a3d6d6e7aea9bfaeb1e4805a6a763f9dda63a522a97e117e149cce2826a7507dddbfa9e398fb158808d6cd953b569d2aea2a98fd2e166476c4d7a99bb587a933
@@ -82,11 +82,23 @@ class Comic < ActiveRecord::Base
82
82
  end
83
83
 
84
84
  class << self
85
+ SUNDAY = 0
85
86
  MONDAY = 1
87
+ TUESDAY = 2
86
88
  WEDNESDAY = 3
89
+ THURSDAY = 4
87
90
  FRIDAY = 5
88
-
89
- VALID_DAYS = [MONDAY, WEDNESDAY, FRIDAY]
91
+ SATURDAY = 6
92
+
93
+ DAY_CONVERSION = {
94
+ :sunday => SUNDAY,
95
+ :monday => MONDAY,
96
+ :tuesday => TUESDAY,
97
+ :wednesday => WEDNESDAY,
98
+ :thursday => THURSDAY,
99
+ :friday => FRIDAY,
100
+ :saturday => SATURDAY
101
+ }
90
102
 
91
103
  def search(query)
92
104
  reverse_numerical.where "LOWER(title) LIKE :query OR LOWER(description) LIKE :query OR LOWER(scene_description) LIKE :query OR LOWER(dialogue) LIKE :query OR LOWER(title_text) LIKE :query", :query => "%#{query.downcase}%"
@@ -126,8 +138,10 @@ class Comic < ActiveRecord::Base
126
138
  from = Date.today
127
139
  end
128
140
 
141
+ valid_days = Setting[:schedule].map { |x| DAY_CONVERSION[x] }
142
+
129
143
  result = from
130
- result += 1.day until result > from && VALID_DAYS.include?(result.wday)
144
+ result += 1.day until result > from && valid_days.include?(result.wday)
131
145
  result
132
146
  end
133
147
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cartoonist-comics"
3
- s.version = "0.0.20.2"
3
+ s.version = "0.0.20.3"
4
4
  s.date = Time.now.strftime "%Y-%m-%d"
5
5
  s.summary = "Cartoonist Comics"
6
6
  s.description = "This core plugin for Cartoonist adds comics."
@@ -10,6 +10,6 @@ Gem::Specification.new do |s|
10
10
  s.files = `git ls-files`.split("\n")
11
11
  s.require_paths = ["lib"]
12
12
  s.homepage = "http://reasonnumber.com/cartoonist"
13
- s.add_dependency "cartoonist", "~> 0.0.20.2"
13
+ s.add_dependency "cartoonist", "~> 0.0.20.3"
14
14
  s.add_dependency "rmagick", "~> 2.13"
15
15
  end
@@ -2,7 +2,7 @@ module CartoonistComics
2
2
  class Version
3
3
  class << self
4
4
  def to_s
5
- "0.0.20.2"
5
+ "0.0.20.3"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist-comics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20.2
4
+ version: 0.0.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Virata-Stone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-15 00:00:00.000000000 Z
11
+ date: 2014-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cartoonist
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.20.2
19
+ version: 0.0.20.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.20.2
26
+ version: 0.0.20.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rmagick
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.13'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.13'
41
41
  description: This core plugin for Cartoonist adds comics.
@@ -75,17 +75,17 @@ require_paths:
75
75
  - lib
76
76
  required_ruby_version: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - '>='
83
+ - - ">="
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
87
  rubyforge_project:
88
- rubygems_version: 2.1.11
88
+ rubygems_version: 2.2.2
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Cartoonist Comics