couch_scheduler 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/features/couch_publish_integration.feature +136 -27
- data/features/couch_visible_and_couch_publish_integration.feature +142 -38
- data/features/couch_visible_integration.feature +135 -27
- data/features/scheduling.feature +337 -37
- data/features/step_definitions/couch_publish_integration.rb +4 -71
- data/features/step_definitions/scheduling.rb +12 -96
- data/features/support/env.rb +6 -0
- data/lib/couch_scheduler.rb +2 -2
- data/lib/couch_scheduler/conditions.rb +23 -0
- data/lib/couch_scheduler/couch_publish_and_couch_visible_integration.rb +3 -18
- data/lib/couch_scheduler/couch_publish_integration.rb +4 -16
- data/lib/couch_scheduler/couch_scheduler.rb +24 -18
- data/lib/couch_scheduler/couch_visible_integration.rb +3 -16
- data/lib/couch_scheduler/map.rb +28 -42
- data/readme.markdown +24 -22
- metadata +21 -5
- data/lib/couch_scheduler/options.rb +0 -33
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couch_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Parker
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-17 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: cucumber
|
@@ -119,6 +119,22 @@ dependencies:
|
|
119
119
|
version: 1.0.0
|
120
120
|
type: :runtime
|
121
121
|
version_requirements: *id007
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
name: couch_view
|
124
|
+
prerelease: false
|
125
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
127
|
+
requirements:
|
128
|
+
- - ~>
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
hash: 27
|
131
|
+
segments:
|
132
|
+
- 0
|
133
|
+
- 0
|
134
|
+
- 2
|
135
|
+
version: 0.0.2
|
136
|
+
type: :runtime
|
137
|
+
version_requirements: *id008
|
122
138
|
description: Create a publishing system that allows you to schedule your documents for publication.
|
123
139
|
email: moonmaster9000@gmail.com
|
124
140
|
executables: []
|
@@ -128,12 +144,12 @@ extensions: []
|
|
128
144
|
extra_rdoc_files: []
|
129
145
|
|
130
146
|
files:
|
147
|
+
- lib/couch_scheduler/conditions.rb
|
131
148
|
- lib/couch_scheduler/couch_publish_and_couch_visible_integration.rb
|
132
149
|
- lib/couch_scheduler/couch_publish_integration.rb
|
133
150
|
- lib/couch_scheduler/couch_scheduler.rb
|
134
151
|
- lib/couch_scheduler/couch_visible_integration.rb
|
135
152
|
- lib/couch_scheduler/map.rb
|
136
|
-
- lib/couch_scheduler/options.rb
|
137
153
|
- lib/couch_scheduler.rb
|
138
154
|
- VERSION
|
139
155
|
- readme.markdown
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module CouchScheduler
|
2
|
-
class Options
|
3
|
-
def initialize(options)
|
4
|
-
@options = massage options.dup
|
5
|
-
end
|
6
|
-
|
7
|
-
def to_hash
|
8
|
-
@options
|
9
|
-
end
|
10
|
-
|
11
|
-
private
|
12
|
-
def massage(options)
|
13
|
-
if !options[:startkey] && !options[:key]
|
14
|
-
options = {:key => format_time(Time.now), :reduce => false}.merge options
|
15
|
-
end
|
16
|
-
|
17
|
-
[:key, :startkey, :endkey].each do |option|
|
18
|
-
options[option] = format_time options[option] if options[option].kind_of?(Time)
|
19
|
-
end
|
20
|
-
|
21
|
-
options.delete :shown
|
22
|
-
options.delete :hidden
|
23
|
-
options.delete :published
|
24
|
-
options.delete :unpublished
|
25
|
-
|
26
|
-
options
|
27
|
-
end
|
28
|
-
|
29
|
-
def format_time(t)
|
30
|
-
[t.year, t.month - 1, t.day, 0, 0, 0]
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|