gollum_rails 1.6.0 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTc1MGI5YjRhZjVlNTNlNmYzYzM4MThkMTY3NGUyMThiMzdiY2FjNw==
4
+ OTRkNTIyMjA0NGU1ODc4ZTZiNDk1NzlkYWUzYzc4NDFjNzRiY2Y0Zg==
5
5
  data.tar.gz: !binary |-
6
- ODZkZDc5MTQwNDY5ODk1MjI2ZDk5MDFhYjQ0MjY1ZWEzZDRhZjMyNQ==
6
+ MjYzZTczY2IwZTA2YWQ5YmU3ZGEyNzRjZDA4ZWVlMDVkZjUyMTlhMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDMxNDllZDRkMWQ5ZmIzOWNjYmI0MDNkMTJhY2MxODQ1ZDg3NzY2MDFjYTg1
10
- MDViNDE3MTkyMzMzMTQyYmExNDRmMzVlMGY5MmEzN2YzNWZmNGI2MTVjM2Qx
11
- NTM2ZTc5NzJlNGRiNmQ2OGRiYzdmZTQ0Y2U1NzVhMzRiOWJiNzE=
9
+ YmMzZGIwYjE1OWNjODk2MWM0NmI4ZTI0MjMxNGI4MTlhZjkyODM1ZjExMDMw
10
+ YjE3YmExY2RhN2NkYmNiYTRhYjk5MjUyMDFmNWUwZmQ2MWE5ODY0NWNlNjI0
11
+ YzhlM2UzMDg1YTExYTg2M2YyZGZkYjZhYjE0YmMzODI1ZmE3NDU=
12
12
  data.tar.gz: !binary |-
13
- MmY0ZmJkZjk3NWM5MjNlZDNlYTM0YTBkYTMzMjk5MmUzMzJiMTM1MjJjMzBj
14
- ODU2OTYzOTdiMmRkZDllZWE4MzYzZjA4MWNjNTBhNjUyNGNmNWMyOWI3Njc1
15
- Nzc0ODk5ZDE2MTQyNjI2ODhhZDk0YzIyNzFjMDZmOTViMmJmOWI=
13
+ OTljNjQ4NDFhZDc2MmU3MjVlZDJjNjcwZmZmZThkZDJjYTBhOTc3NTdjZTcw
14
+ MjQ2MmMwMWJlMmZhZThkNGE5ODJiNjZjMWE2NDMwMmQ0ODEwM2Y1YjI4YjVk
15
+ NjI3NzY2YzA5MGE5MDJiMWY2OTY5NTBhOGIwMGQ2NTE5OGY2MTc=
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'coveralls', require: false
4
+ gem 'wwtd'
4
5
 
5
6
 
6
7
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gollum_rails (1.6.0)
4
+ gollum_rails (1.6.3)
5
5
  activemodel (>= 3.2.11)
6
6
  activesupport (>= 3.2.11)
7
7
  gollum-lib (~> 3.0.0)
@@ -170,6 +170,7 @@ GEM
170
170
  polyglot (>= 0.3.1)
171
171
  tzinfo (1.2.1)
172
172
  thread_safe (~> 0.1)
173
+ wwtd (0.5.5)
173
174
 
174
175
  PLATFORMS
175
176
  ruby
@@ -185,3 +186,4 @@ DEPENDENCIES
185
186
  rb-fsevent (>= 0.9.3)
186
187
  redcarpet (>= 3.1.1)
187
188
  rspec (~> 3.0)
189
+ wwtd
data/Rakefile CHANGED
@@ -2,6 +2,10 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'date'
4
4
  require 'rspec/core/rake_task'
5
+ require 'wwtd/tasks'
6
+
7
+ task :local => "wwtd:local"
8
+ task default: "wwtd:local"
5
9
 
6
10
 
7
11
  #############################################################################
@@ -66,7 +70,7 @@ end
66
70
  #
67
71
  #############################################################################
68
72
 
69
- task :default => :spec_run
73
+ #task :default => :spec_run
70
74
 
71
75
  desc "Run RSpec"
72
76
  RSpec::Core::RakeTask.new do |t|
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec path: "../"
3
+ gem "rails", "~> 3.2.18"
4
+ gem "coveralls"
@@ -0,0 +1,235 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ gollum_rails (1.6.2)
5
+ activemodel (>= 3.2.11)
6
+ activesupport (>= 3.2.11)
7
+ gollum-lib (~> 3.0.0)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actionmailer (3.2.19)
13
+ actionpack (= 3.2.19)
14
+ mail (~> 2.5.4)
15
+ actionpack (3.2.19)
16
+ activemodel (= 3.2.19)
17
+ activesupport (= 3.2.19)
18
+ builder (~> 3.0.0)
19
+ erubis (~> 2.7.0)
20
+ journey (~> 1.0.4)
21
+ rack (~> 1.4.5)
22
+ rack-cache (~> 1.2)
23
+ rack-test (~> 0.6.1)
24
+ sprockets (~> 2.2.1)
25
+ activemodel (3.2.19)
26
+ activesupport (= 3.2.19)
27
+ builder (~> 3.0.0)
28
+ activerecord (3.2.19)
29
+ activemodel (= 3.2.19)
30
+ activesupport (= 3.2.19)
31
+ arel (~> 3.0.2)
32
+ tzinfo (~> 0.3.29)
33
+ activeresource (3.2.19)
34
+ activemodel (= 3.2.19)
35
+ activesupport (= 3.2.19)
36
+ activesupport (3.2.19)
37
+ i18n (~> 0.6, >= 0.6.4)
38
+ multi_json (~> 1.0)
39
+ arel (3.0.3)
40
+ builder (3.0.4)
41
+ celluloid (0.15.2)
42
+ timers (~> 1.1.0)
43
+ charlock_holmes (0.7.3)
44
+ coderay (1.1.0)
45
+ coveralls (0.7.0)
46
+ multi_json (~> 1.3)
47
+ rest-client
48
+ simplecov (>= 0.7)
49
+ term-ansicolor
50
+ thor
51
+ diff-lcs (1.2.5)
52
+ docile (1.1.5)
53
+ erubis (2.7.0)
54
+ factory_girl (4.4.0)
55
+ activesupport (>= 3.0.0)
56
+ ffi (1.9.3)
57
+ formatador (0.2.5)
58
+ github-markup (1.1.2)
59
+ posix-spawn (~> 0.3.8)
60
+ gitlab-grit (2.6.10)
61
+ charlock_holmes (~> 0.6)
62
+ diff-lcs (~> 1.1)
63
+ mime-types (~> 1.15)
64
+ posix-spawn (~> 0.3)
65
+ gollum-lib (3.0.0)
66
+ github-markup (~> 1.1.0)
67
+ gitlab-grit (~> 2.6.5)
68
+ nokogiri (~> 1.6.1)
69
+ rouge (~> 1.3.3)
70
+ sanitize (~> 2.1.0)
71
+ stringex (~> 2.5.1)
72
+ guard (2.6.1)
73
+ formatador (>= 0.2.4)
74
+ listen (~> 2.7)
75
+ lumberjack (~> 1.0)
76
+ pry (>= 0.9.12)
77
+ thor (>= 0.18.1)
78
+ guard-rspec (4.2.10)
79
+ guard (~> 2.1)
80
+ rspec (>= 2.14, < 4.0)
81
+ hashr (0.0.22)
82
+ hike (1.2.3)
83
+ i18n (0.6.11)
84
+ journey (1.0.4)
85
+ json (1.8.1)
86
+ listen (2.7.9)
87
+ celluloid (>= 0.15.2)
88
+ rb-fsevent (>= 0.9.3)
89
+ rb-inotify (>= 0.9)
90
+ lumberjack (1.0.9)
91
+ mail (2.5.4)
92
+ mime-types (~> 1.16)
93
+ treetop (~> 1.4.8)
94
+ method_source (0.8.2)
95
+ mime-types (1.25.1)
96
+ mini_portile (0.6.0)
97
+ multi_json (1.10.1)
98
+ netrc (0.7.7)
99
+ nokogiri (1.6.3.1)
100
+ mini_portile (= 0.6.0)
101
+ polyglot (0.3.5)
102
+ posix-spawn (0.3.9)
103
+ pry (0.10.0)
104
+ coderay (~> 1.1.0)
105
+ method_source (~> 0.8.1)
106
+ slop (~> 3.4)
107
+ rack (1.4.5)
108
+ rack-cache (1.2)
109
+ rack (>= 0.4)
110
+ rack-ssl (1.3.4)
111
+ rack
112
+ rack-test (0.6.2)
113
+ rack (>= 1.0)
114
+ rails (3.2.19)
115
+ actionmailer (= 3.2.19)
116
+ actionpack (= 3.2.19)
117
+ activerecord (= 3.2.19)
118
+ activeresource (= 3.2.19)
119
+ activesupport (= 3.2.19)
120
+ bundler (~> 1.0)
121
+ railties (= 3.2.19)
122
+ railties (3.2.19)
123
+ actionpack (= 3.2.19)
124
+ activesupport (= 3.2.19)
125
+ rack-ssl (~> 1.3.2)
126
+ rake (>= 0.8.7)
127
+ rdoc (~> 3.4)
128
+ thor (>= 0.14.6, < 2.0)
129
+ rake (10.3.2)
130
+ rb-fsevent (0.9.4)
131
+ rb-inotify (0.9.5)
132
+ ffi (>= 0.5.0)
133
+ rdoc (3.12.2)
134
+ json (~> 1.4)
135
+ redcarpet (3.1.2)
136
+ rest-client (1.7.2)
137
+ mime-types (>= 1.16, < 3.0)
138
+ netrc (~> 0.7)
139
+ rouge (1.3.4)
140
+ rspec (3.0.0)
141
+ rspec-core (~> 3.0.0)
142
+ rspec-expectations (~> 3.0.0)
143
+ rspec-mocks (~> 3.0.0)
144
+ rspec-core (3.0.3)
145
+ rspec-support (~> 3.0.0)
146
+ rspec-expectations (3.0.3)
147
+ diff-lcs (>= 1.2.0, < 2.0)
148
+ rspec-support (~> 3.0.0)
149
+ rspec-mocks (3.0.3)
150
+ rspec-support (~> 3.0.0)
151
+ rspec-support (3.0.3)
152
+ sanitize (2.1.0)
153
+ nokogiri (>= 1.4.4)
154
+ simplecov (0.9.0)
155
+ docile (~> 1.1.0)
156
+ multi_json
157
+ simplecov-html (~> 0.8.0)
158
+ simplecov-html (0.8.0)
159
+ slop (3.6.0)
160
+ sprockets (2.2.2)
161
+ hike (~> 1.2)
162
+ multi_json (~> 1.0)
163
+ rack (~> 1.0)
164
+ tilt (~> 1.1, != 1.3.0)
165
+ stringex (2.5.2)
166
+ term-ansicolor (1.3.0)
167
+ tins (~> 1.0)
168
+ thor (0.19.1)
169
+ tilt (1.4.1)
170
+ timers (1.1.0)
171
+ tins (1.3.1)
172
+ treetop (1.4.15)
173
+ polyglot
174
+ polyglot
175
+ polyglot
176
+ polyglot
177
+ polyglot
178
+ polyglot
179
+ polyglot
180
+ polyglot
181
+ polyglot
182
+ polyglot
183
+ polyglot
184
+ polyglot
185
+ polyglot
186
+ polyglot
187
+ polyglot
188
+ polyglot
189
+ polyglot
190
+ polyglot (>= 0.3.1)
191
+ polyglot (>= 0.3.1)
192
+ polyglot (>= 0.3.1)
193
+ polyglot (>= 0.3.1)
194
+ polyglot (>= 0.3.1)
195
+ polyglot (>= 0.3.1)
196
+ polyglot (>= 0.3.1)
197
+ polyglot (>= 0.3.1)
198
+ polyglot (>= 0.3.1)
199
+ polyglot (>= 0.3.1)
200
+ polyglot (>= 0.3.1)
201
+ polyglot (>= 0.3.1)
202
+ polyglot (>= 0.3.1)
203
+ polyglot (>= 0.3.1)
204
+ polyglot (>= 0.3.1)
205
+ polyglot (>= 0.3.1)
206
+ polyglot (>= 0.3.1)
207
+ polyglot (>= 0.3.1)
208
+ polyglot (>= 0.3.1)
209
+ polyglot (>= 0.3.1)
210
+ polyglot (>= 0.3.1)
211
+ polyglot (>= 0.3.1)
212
+ polyglot (>= 0.3.1)
213
+ polyglot (>= 0.3.1)
214
+ polyglot (>= 0.3.1)
215
+ polyglot (>= 0.3.1)
216
+ polyglot (>= 0.3.1)
217
+ polyglot (>= 0.3.1)
218
+ polyglot (>= 0.3.1)
219
+ polyglot (>= 0.3.1)
220
+ tzinfo (0.3.41)
221
+
222
+ PLATFORMS
223
+ ruby
224
+
225
+ DEPENDENCIES
226
+ coveralls
227
+ factory_girl (~> 4.4)
228
+ gollum_rails!
229
+ guard (~> 2.6.0)
230
+ guard-rspec (~> 4.2.8)
231
+ hashr (~> 0.0.22)
232
+ rails (~> 3.2.18)
233
+ rb-fsevent (>= 0.9.3)
234
+ redcarpet (>= 3.1.1)
235
+ rspec (~> 3.0)
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec path: "../"
3
+ gem "rails", "~> 3.2.13"
4
+ gem "coveralls"
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec path: "../"
3
+ gem "rails", "~> 4.1.4"
4
+ gem "coveralls"
data/gollum_rails.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = 'gollum_rails'
5
5
  s.rubyforge_project = s.name
6
6
 
7
- s.version = '1.6.0'
7
+ s.version = '1.6.3'
8
8
 
9
9
  s.summary = 'Combines Gollum and Rails'
10
10
  s.description= 'include Gollum into Rails with ease'
@@ -38,6 +38,10 @@ Gem::Specification.new do |s|
38
38
  LICENSE
39
39
  README.md
40
40
  Rakefile
41
+ gemfiles/rails3.gemfile
42
+ gemfiles/rails3.gemfile.lock
43
+ gemfiles/rails3213.gemfile
44
+ gemfiles/rails4.gemfile
41
45
  gollum_rails.gemspec
42
46
  lib/generators/gollum_rails/install/install_generator.rb
43
47
  lib/generators/gollum_rails/install/templates/gollum_initializer.rb
data/lib/gollum_rails.rb CHANGED
@@ -45,7 +45,7 @@ module GollumRails
45
45
  autoload :Meta
46
46
 
47
47
  # GollumRails version
48
- VERSION = '1.6.0'
48
+ VERSION = '1.6.3'
49
49
 
50
50
  end
51
51
 
@@ -1,8 +1,10 @@
1
1
  module GollumRails
2
2
  class Upload
3
3
  if ActiveModel::VERSION::MAJOR == 4
4
+ API_VERSION=4
4
5
  include ActiveModel::Model
5
6
  else
7
+ API_VERSION=3
6
8
  extend ActiveModel::Naming
7
9
  extend ActiveModel::Callbacks
8
10
  include ActiveModel::Conversion
@@ -41,10 +43,15 @@ module GollumRails
41
43
  # Allowed formats in future
42
44
  format = ext.split('.').last || "txt"
43
45
  filename = ::File.basename(fullname, ext)
44
- contents = ::File.read(tempfile)
46
+ if tempfile.respond_to?(:tempfile)
47
+ contents = ::File.read(tempfile.tempfile)
48
+ else
49
+ contents = ::File.read(tempfile)
50
+ end
45
51
  #reponame = filename + '.' + format
46
52
  head = self.class.wiki.repo.head
47
53
 
54
+ @commit ||= {}
48
55
  options = self.commit.merge(parent: head.commit)
49
56
  committer = Gollum::Committer.new(self.class.wiki, options)
50
57
  committer.add_to_index(@dir, filename, format, contents)
@@ -54,7 +54,14 @@ describe GollumRails::Upload do
54
54
  end
55
55
  end
56
56
 
57
- describe "::create" do
57
+ describe ".create" do
58
+ describe "with empty committer" do
59
+ let(:ins){create(:upload, commit: nil)}
60
+ it "should not fail to create" do
61
+ expect{ins}.not_to raise_error
62
+
63
+ end
64
+ end
58
65
 
59
66
  end
60
67
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Kasper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-19 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -177,6 +177,10 @@ files:
177
177
  - LICENSE
178
178
  - README.md
179
179
  - Rakefile
180
+ - gemfiles/rails3.gemfile
181
+ - gemfiles/rails3.gemfile.lock
182
+ - gemfiles/rails3213.gemfile
183
+ - gemfiles/rails4.gemfile
180
184
  - gollum_rails.gemspec
181
185
  - lib/generators/gollum_rails/install/install_generator.rb
182
186
  - lib/generators/gollum_rails/install/templates/gollum_initializer.rb
@@ -240,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
244
  version: '0'
241
245
  requirements: []
242
246
  rubyforge_project: gollum_rails
243
- rubygems_version: 2.2.2
247
+ rubygems_version: 2.3.0
244
248
  signing_key:
245
249
  specification_version: 4
246
250
  summary: Combines Gollum and Rails