publishable 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,31 @@
1
- $:.unshift File.expand_path('../../lib', __FILE__)
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+
3
+ if RUBY_VERSION > '1.9'
4
+ require 'simplecov'
5
+ SimpleCov.start
6
+ end
7
+
8
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
10
+
11
+ require 'ffaker'
12
+ require 'acts_as_fu'
13
+ require 'rspec'
14
+ require 'timecop'
2
15
  require 'publishable'
3
- require 'spec'
4
- require 'spec/autorun'
5
16
 
6
- require 'sqlite3'
7
- require 'active_record'
17
+ # Requires supporting files with custom matchers and macros, etc,
18
+ # in ./support/ and its subdirectories.
19
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
20
+
21
+ RSpec.configure do |config|
22
+
23
+ config.include ActsAsFu
24
+
25
+ # Run specs in random order to surface order dependencies. If you find an
26
+ # order dependency and want to debug it, you can fix the order by providing
27
+ # the seed, which is printed after each run.
28
+ # --seed 1234
29
+ config.order = 'random'
8
30
 
9
- Spec::Runner.configure do |config|
10
- config.mock_with :mocha
11
31
  end
@@ -0,0 +1,12 @@
1
+ RSpec::Matchers.define :each do |meta|
2
+ match do |actual|
3
+ actual.each_with_index do |i, j|
4
+ @elem = j
5
+ i.should meta
6
+ end
7
+ end
8
+
9
+ failure_message_for_should do |actual|
10
+ "at[#{@elem}] #{meta.failure_message_for_should}"
11
+ end
12
+ end
metadata CHANGED
@@ -1,67 +1,134 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publishable
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 23
5
+ prerelease:
5
6
  segments:
7
+ - 1
6
8
  - 0
7
- - 3
8
9
  - 0
9
- version: 0.3.0
10
+ version: 1.0.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Martin Linkhorst
14
+ - !binary |
15
+ 0YLOuc630YPOt8+F0LzQstGU0Y/RlQ==
16
+
13
17
  autorequire:
14
18
  bindir: bin
15
19
  cert_chain: []
16
20
 
17
- date: 2010-09-29 00:00:00 +02:00
18
- default_executable:
21
+ date: 2013-03-07 00:00:00 Z
19
22
  dependencies:
20
23
  - !ruby/object:Gem::Dependency
21
- name: rspec
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 5
30
+ segments:
31
+ - 0
32
+ - 7
33
+ version: "0.7"
34
+ prerelease: false
35
+ type: :development
36
+ name: yard
37
+ requirement: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ hash: 31
45
+ segments:
46
+ - 3
47
+ - 12
48
+ version: "3.12"
49
+ prerelease: false
50
+ type: :development
51
+ name: rdoc
52
+ requirement: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 15
60
+ segments:
61
+ - 1
62
+ - 0
63
+ version: "1.0"
22
64
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
65
+ type: :development
66
+ name: bundler
67
+ requirement: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ version_requirements: &id004 !ruby/object:Gem::Requirement
24
70
  none: false
25
71
  requirements:
26
- - - ">="
72
+ - - ~>
27
73
  - !ruby/object:Gem::Version
74
+ hash: 63
28
75
  segments:
29
76
  - 1
77
+ - 8
78
+ - 4
79
+ version: 1.8.4
80
+ prerelease: false
81
+ type: :development
82
+ name: jeweler
83
+ requirement: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ hash: 47
91
+ segments:
30
92
  - 2
31
- - 9
32
- version: 1.2.9
93
+ - 8
94
+ - 0
95
+ version: 2.8.0
96
+ prerelease: false
33
97
  type: :development
34
- version_requirements: *id001
35
- description: Provides methods to publish and unpublish your active record models based on a datetime. Also adds named scopes to nicely filter your records. Does not touch any controller or views.
36
- email: m.linkhorst@googlemail.com
98
+ name: rspec
99
+ requirement: *id005
100
+ description: Provides methods to publish and unpublish your active record models based on a boolean flag, a date, or a datetime. Also adds named scopes to nicely filter your records. Does not touch any controller or views.
101
+ email:
102
+ - m.linkhorst@googlemail.com
103
+ - info@tinynumbers.com
37
104
  executables: []
38
105
 
39
106
  extensions: []
40
107
 
41
108
  extra_rdoc_files:
42
- - LICENSE
43
- - README.textile
109
+ - LICENSE.txt
110
+ - README.rdoc
44
111
  files:
45
112
  - .document
46
- - .gitignore
47
- - LICENSE
48
- - README.textile
113
+ - .rspec
114
+ - Gemfile
115
+ - Gemfile.lock
116
+ - LICENSE.txt
117
+ - README.rdoc
49
118
  - Rakefile
50
- - VERSION
51
- - db/schema.rb
52
119
  - lib/publishable.rb
53
120
  - lib/publishable/railtie.rb
121
+ - lib/publishable/version.rb
54
122
  - publishable.gemspec
55
123
  - spec/publishable_spec.rb
56
- - spec/spec.opts
57
124
  - spec/spec_helper.rb
58
- has_rdoc: true
125
+ - spec/support/matcher_each.rb
59
126
  homepage: http://github.com/linki/publishable
60
- licenses: []
61
-
127
+ licenses:
128
+ - MIT
62
129
  post_install_message:
63
- rdoc_options:
64
- - --charset=UTF-8
130
+ rdoc_options: []
131
+
65
132
  require_paths:
66
133
  - lib
67
134
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -69,6 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
136
  requirements:
70
137
  - - ">="
71
138
  - !ruby/object:Gem::Version
139
+ hash: 3
72
140
  segments:
73
141
  - 0
74
142
  version: "0"
@@ -77,16 +145,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
145
  requirements:
78
146
  - - ">="
79
147
  - !ruby/object:Gem::Version
148
+ hash: 3
80
149
  segments:
81
150
  - 0
82
151
  version: "0"
83
152
  requirements: []
84
153
 
85
154
  rubyforge_project:
86
- rubygems_version: 1.3.7
155
+ rubygems_version: 1.8.24
87
156
  signing_key:
88
157
  specification_version: 3
89
158
  summary: Adds publishing functionality to your active record model
90
- test_files:
91
- - spec/publishable_spec.rb
92
- - spec/spec_helper.rb
159
+ test_files: []
160
+
data/.gitignore DELETED
@@ -1,22 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
22
- db/test.sqlite3
@@ -1,29 +0,0 @@
1
- h1. Publishable
2
-
3
- <pre>
4
- gem install publishable
5
- </pre>
6
-
7
- h2. Setup
8
-
9
- you need a datetime column called published_at in your table and call publishable in your class body
10
-
11
- <pre>
12
- class Album < ActiveRecord::Base
13
- publishable
14
- end
15
- </pre>
16
-
17
- h2. Methods
18
-
19
- <pre>
20
- album = Album.new
21
-
22
- album.published? # => false
23
- album.publish! # calls :save afterwards
24
- album.published? # => true
25
-
26
- Album.published.all # => finds all published albums
27
- </pre>
28
-
29
- Copyright (c) 2010 Martin Linkhorst, released under the MIT license.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.3.0
@@ -1,8 +0,0 @@
1
- ActiveRecord::Schema.define(:version => 0) do
2
- create_table :albums, :force => true do |t|
3
- t.datetime :published_at
4
- end
5
- create_table :features, :force => true do |t|
6
- t.datetime :public_since
7
- end
8
- end
@@ -1,2 +0,0 @@
1
- --color
2
- --format nested