rails_codebook 0.0.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +17 -0
  4. data/.ruby-gemset +1 -0
  5. data/.ruby-version +1 -0
  6. data/.travis.yml +10 -0
  7. data/Gemfile +6 -0
  8. data/LICENSE.txt +22 -0
  9. data/MIT-LICENSE +22 -0
  10. data/README.md +31 -0
  11. data/Rakefile +1 -0
  12. data/app/assets/javascripts/rails_codebook/application.js +16 -0
  13. data/app/assets/javascripts/rails_codebook/bootstrap.js +5 -0
  14. data/app/assets/javascripts/rails_codebook/codebooks.js +27 -0
  15. data/app/assets/javascripts/rails_codebook/jquery.autosize.js +192 -0
  16. data/app/assets/stylesheets/rails_codebook/application.css +13 -0
  17. data/app/assets/stylesheets/rails_codebook/bootstrap_and_overrides.css +7 -0
  18. data/app/assets/stylesheets/rails_codebook/codebooks.css +44 -0
  19. data/app/controllers/rails_codebook/admin/codebooks_controller.rb +65 -0
  20. data/app/controllers/rails_codebook/api/codebooks_controller.rb +44 -0
  21. data/app/helpers/rails_codebook/admin/codebooks_helper.rb +43 -0
  22. data/app/models/rails_codebook/codebook.rb +44 -0
  23. data/app/views/layouts/rails_codebook/application.html.erb +35 -0
  24. data/app/views/rails_codebook/admin/codebooks/_codebook.html.erb +44 -0
  25. data/app/views/rails_codebook/admin/codebooks/create.js.erb +9 -0
  26. data/app/views/rails_codebook/admin/codebooks/destroy.js.erb +2 -0
  27. data/app/views/rails_codebook/admin/codebooks/index.html.erb +90 -0
  28. data/config/initializers/will_paginate.rb +3 -0
  29. data/config/locales/cs.yml +268 -0
  30. data/config/locales/en.yml +11 -0
  31. data/config/routes.rb +25 -0
  32. data/lib/generators/rails_codebook/install/USAGE +9 -0
  33. data/lib/generators/rails_codebook/install/install_generator.rb +21 -0
  34. data/lib/generators/rails_codebook/install/templates/seeds.rb.erb +271 -0
  35. data/lib/rails_codebook/acts_as_codebook.rb +88 -0
  36. data/lib/rails_codebook/controller/base.rb +27 -0
  37. data/lib/rails_codebook/engine.rb +6 -0
  38. data/lib/rails_codebook/has_codebooks.rb +115 -0
  39. data/lib/rails_codebook/model/base.rb +73 -0
  40. data/lib/rails_codebook/version.rb +3 -0
  41. data/lib/rails_codebook.rb +50 -0
  42. data/rails_codebook.gemspec +40 -0
  43. data/script/rails +8 -0
  44. data/test/test_helper.rb +45 -0
  45. metadata +326 -0
@@ -0,0 +1,40 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rails_codebook/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rails_codebook"
8
+ spec.version = RailsCodebook::VERSION
9
+ spec.authors = ["redrick"]
10
+ spec.email = ["andrej.antas@gmail.com"]
11
+ spec.description = "Codebook solution we all use in our projects"
12
+ spec.summary = "Codebook solution we all use in our projects."
13
+ spec.homepage = "https://github.com/redrick/rails_codebook"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "redis"
22
+
23
+ spec.add_dependency "rails", "~> 4.0.0"
24
+ spec.add_dependency "jquery-rails"
25
+ spec.add_dependency "jquery-ui-rails"
26
+ spec.add_dependency 'uglifier'
27
+ spec.add_dependency 'will_paginate'
28
+ spec.add_dependency "less-rails"
29
+ spec.add_dependency 'twitter-bootstrap-rails'
30
+ spec.add_dependency 'sqlite3'
31
+
32
+ spec.add_development_dependency 'sqlite3'
33
+ spec.add_development_dependency "simplecov"
34
+ spec.add_development_dependency "coveralls"
35
+ spec.add_development_dependency "bundler", "~> 1.3"
36
+ spec.add_development_dependency "minitest-rails"
37
+ spec.add_development_dependency "minitest-rails-capybara"
38
+ spec.add_development_dependency "factory_girl_rails"
39
+ spec.add_development_dependency "rake"
40
+ end
data/script/rails ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/rails_codebook/engine', __FILE__)
6
+
7
+ require 'rails/all'
8
+ require 'rails/engine/commands'
@@ -0,0 +1,45 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path("../../config/environment", __FILE__)
3
+
4
+ require "rails/test_help"
5
+ require 'minitest/autorun'
6
+ require "minitest/rails/capybara"
7
+ require 'simplecov'
8
+ require 'coveralls'
9
+
10
+ Coveralls.wear!
11
+
12
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
13
+ SimpleCov::Formatter::HTMLFormatter,
14
+ Coveralls::SimpleCov::Formatter
15
+ ]
16
+
17
+ SimpleCov.start do
18
+ add_filter "/test/"
19
+ add_filter "/config/"
20
+ add_filter "/script/"
21
+ end
22
+
23
+ FactoryGirl.definition_file_paths = %w(test/support/)
24
+ FactoryGirl.find_definitions
25
+
26
+ class MiniTest::Spec
27
+ include Capybara::DSL
28
+ include Rails.application.routes.url_helpers
29
+ include FactoryGirl::Syntax::Methods
30
+
31
+ @@flag ||= nil
32
+
33
+ unless @@flag
34
+ @@flag = true
35
+ FileUtils.rm_rf("#{Rails.root}/datafiles/test")
36
+ load "#{Rails.root}/db/seeds.rb"
37
+ end
38
+
39
+ end
40
+
41
+
42
+ class ActiveSupport::TestCase
43
+ include FactoryGirl::Syntax::Methods
44
+ end
45
+
metadata ADDED
@@ -0,0 +1,326 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_codebook
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.alpha
5
+ platform: ruby
6
+ authors:
7
+ - redrick
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: redis
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 4.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 4.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: jquery-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jquery-ui-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: uglifier
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: will_paginate
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: less-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: twitter-bootstrap-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: sqlite3
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sqlite3
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: coveralls
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '>='
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: bundler
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ~>
186
+ - !ruby/object:Gem::Version
187
+ version: '1.3'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ~>
193
+ - !ruby/object:Gem::Version
194
+ version: '1.3'
195
+ - !ruby/object:Gem::Dependency
196
+ name: minitest-rails
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - '>='
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - '>='
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: minitest-rails-capybara
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: factory_girl_rails
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - '>='
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: rake
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ description: Codebook solution we all use in our projects
252
+ email:
253
+ - andrej.antas@gmail.com
254
+ executables: []
255
+ extensions: []
256
+ extra_rdoc_files: []
257
+ files:
258
+ - .coveralls.yml
259
+ - .gitignore
260
+ - .ruby-gemset
261
+ - .ruby-version
262
+ - .travis.yml
263
+ - Gemfile
264
+ - LICENSE.txt
265
+ - MIT-LICENSE
266
+ - README.md
267
+ - Rakefile
268
+ - app/assets/javascripts/rails_codebook/application.js
269
+ - app/assets/javascripts/rails_codebook/bootstrap.js
270
+ - app/assets/javascripts/rails_codebook/codebooks.js
271
+ - app/assets/javascripts/rails_codebook/jquery.autosize.js
272
+ - app/assets/stylesheets/rails_codebook/application.css
273
+ - app/assets/stylesheets/rails_codebook/bootstrap_and_overrides.css
274
+ - app/assets/stylesheets/rails_codebook/codebooks.css
275
+ - app/controllers/rails_codebook/admin/codebooks_controller.rb
276
+ - app/controllers/rails_codebook/api/codebooks_controller.rb
277
+ - app/helpers/rails_codebook/admin/codebooks_helper.rb
278
+ - app/models/rails_codebook/codebook.rb
279
+ - app/views/layouts/rails_codebook/application.html.erb
280
+ - app/views/rails_codebook/admin/codebooks/_codebook.html.erb
281
+ - app/views/rails_codebook/admin/codebooks/create.js.erb
282
+ - app/views/rails_codebook/admin/codebooks/destroy.js.erb
283
+ - app/views/rails_codebook/admin/codebooks/index.html.erb
284
+ - config/initializers/will_paginate.rb
285
+ - config/locales/cs.yml
286
+ - 'config/locales/en.yml '
287
+ - config/routes.rb
288
+ - lib/generators/rails_codebook/install/USAGE
289
+ - lib/generators/rails_codebook/install/install_generator.rb
290
+ - lib/generators/rails_codebook/install/templates/seeds.rb.erb
291
+ - lib/rails_codebook.rb
292
+ - lib/rails_codebook/acts_as_codebook.rb
293
+ - lib/rails_codebook/controller/base.rb
294
+ - lib/rails_codebook/engine.rb
295
+ - lib/rails_codebook/has_codebooks.rb
296
+ - lib/rails_codebook/model/base.rb
297
+ - lib/rails_codebook/version.rb
298
+ - rails_codebook.gemspec
299
+ - script/rails
300
+ - test/test_helper.rb
301
+ homepage: https://github.com/redrick/rails_codebook
302
+ licenses:
303
+ - MIT
304
+ metadata: {}
305
+ post_install_message:
306
+ rdoc_options: []
307
+ require_paths:
308
+ - lib
309
+ required_ruby_version: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - '>='
312
+ - !ruby/object:Gem::Version
313
+ version: '0'
314
+ required_rubygems_version: !ruby/object:Gem::Requirement
315
+ requirements:
316
+ - - '>'
317
+ - !ruby/object:Gem::Version
318
+ version: 1.3.1
319
+ requirements: []
320
+ rubyforge_project:
321
+ rubygems_version: 2.1.5
322
+ signing_key:
323
+ specification_version: 4
324
+ summary: Codebook solution we all use in our projects.
325
+ test_files:
326
+ - test/test_helper.rb