dead_gems 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +102 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +42 -0
  7. data/Rakefile +2 -0
  8. data/dead_gems.gemspec +29 -0
  9. data/dummy/.gitignore +16 -0
  10. data/dummy/Gemfile +45 -0
  11. data/dummy/Gemfile.lock +130 -0
  12. data/dummy/README.rdoc +28 -0
  13. data/dummy/Rakefile +6 -0
  14. data/dummy/app/assets/images/.keep +0 -0
  15. data/dummy/app/assets/javascripts/application.js +16 -0
  16. data/dummy/app/assets/stylesheets/application.css +15 -0
  17. data/dummy/app/controllers/application_controller.rb +5 -0
  18. data/dummy/app/controllers/concerns/.keep +0 -0
  19. data/dummy/app/helpers/application_helper.rb +2 -0
  20. data/dummy/app/mailers/.keep +0 -0
  21. data/dummy/app/models/.keep +0 -0
  22. data/dummy/app/models/concerns/.keep +0 -0
  23. data/dummy/app/models/user.rb +8 -0
  24. data/dummy/app/views/layouts/application.html.erb +14 -0
  25. data/dummy/bin/bundle +3 -0
  26. data/dummy/bin/rails +8 -0
  27. data/dummy/bin/rake +8 -0
  28. data/dummy/bin/spring +15 -0
  29. data/dummy/config/application.rb +23 -0
  30. data/dummy/config/boot.rb +4 -0
  31. data/dummy/config/database.yml +25 -0
  32. data/dummy/config/environment.rb +5 -0
  33. data/dummy/config/environments/development.rb +37 -0
  34. data/dummy/config/environments/production.rb +82 -0
  35. data/dummy/config/environments/test.rb +39 -0
  36. data/dummy/config/initializers/assets.rb +8 -0
  37. data/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/dummy/config/initializers/cookies_serializer.rb +3 -0
  39. data/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  40. data/dummy/config/initializers/inflections.rb +16 -0
  41. data/dummy/config/initializers/mime_types.rb +4 -0
  42. data/dummy/config/initializers/session_store.rb +3 -0
  43. data/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/dummy/config/locales/en.yml +23 -0
  45. data/dummy/config/routes.rb +56 -0
  46. data/dummy/config/secrets.yml +22 -0
  47. data/dummy/config.ru +4 -0
  48. data/dummy/db/seeds.rb +7 -0
  49. data/dummy/lib/assets/.keep +0 -0
  50. data/dummy/lib/tasks/.keep +0 -0
  51. data/dummy/log/.keep +0 -0
  52. data/dummy/public/404.html +67 -0
  53. data/dummy/public/422.html +67 -0
  54. data/dummy/public/500.html +66 -0
  55. data/dummy/public/favicon.ico +0 -0
  56. data/dummy/public/robots.txt +5 -0
  57. data/dummy/test/controllers/.keep +0 -0
  58. data/dummy/test/fixtures/.keep +0 -0
  59. data/dummy/test/helpers/.keep +0 -0
  60. data/dummy/test/integration/.keep +0 -0
  61. data/dummy/test/mailers/.keep +0 -0
  62. data/dummy/test/models/.keep +0 -0
  63. data/dummy/test/models/user_test.rb +7 -0
  64. data/dummy/test/test_helper.rb +34 -0
  65. data/dummy/vendor/assets/javascripts/.keep +0 -0
  66. data/dummy/vendor/assets/stylesheets/.keep +0 -0
  67. data/lib/dead_gems/version.rb +3 -0
  68. data/lib/dead_gems.rb +81 -0
  69. data/spec/dead_gems_spec.rb +38 -0
  70. data/spec/spec_helper.rb +6 -0
  71. metadata +215 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 848d2bbc02f664dfe6f70c87ac7e9deb42159044
4
+ data.tar.gz: b6ff213b444308dc5ce0076532904294b35ac1c2
5
+ SHA512:
6
+ metadata.gz: 4112a8c8772b42998b899e7b809ddc031fb5f7209c94b8512419ac0a2b14f3f6ec8f3afe712fbf88b6f7a62cb10c1f5b98d301186b4578f189a741174ed32500
7
+ data.tar.gz: 8aa94f35b3b232fa1b3c85d4f975410776eb867062ccb579bb107ee6665bc5a5ab1b8e9dc2f5ec28a0f37d74bc43baab95275fbd7546f2b5cdd647bc6faaa2ad
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dead_gems.gemspec
4
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,102 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features)
6
+
7
+ ## Uncomment to clear the screen before every task
8
+ # clearing :on
9
+
10
+ ## Guard internally checks for changes in the Guardfile and exits.
11
+ ## If you want Guard to automatically start up again, run guard in a
12
+ ## shell loop, e.g.:
13
+ ##
14
+ ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15
+ ##
16
+ ## Note: if you are using the `directories` clause above and you are not
17
+ ## watching the project directory ('.'), then you will want to move
18
+ ## the Guardfile to a watched dir and symlink it back, e.g.
19
+ #
20
+ # $ mkdir config
21
+ # $ mv Guardfile config/
22
+ # $ ln -s config/Guardfile .
23
+ #
24
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
25
+
26
+ guard :minitest do
27
+ # with Minitest::Unit
28
+ #watch(%r{^test/(.*)\/?test_(.*)\.rb$})
29
+ #watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
30
+ #watch(%r{^test/test_helper\.rb$}) { 'test' }
31
+
32
+ # with Minitest::Spec
33
+ watch(%r{^spec/(.*)_spec\.rb$})
34
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
35
+ watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
36
+
37
+ # Rails 4
38
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
39
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
40
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
41
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
42
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
43
+ # watch(%r{^test/.+_test\.rb$})
44
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
45
+
46
+ # Rails < 4
47
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
48
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
49
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
50
+ end
51
+
52
+ guard :minitest do
53
+ # with Minitest::Unit
54
+ watch(%r{^test/(.*)\/?test_(.*)\.rb$})
55
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
56
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
57
+
58
+ # with Minitest::Spec
59
+ # watch(%r{^spec/(.*)_spec\.rb$})
60
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
61
+ # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
62
+
63
+ # Rails 4
64
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
65
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
66
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
67
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
68
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
69
+ # watch(%r{^test/.+_test\.rb$})
70
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
71
+
72
+ # Rails < 4
73
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
74
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
75
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
76
+ end
77
+
78
+ guard :minitest do
79
+ # with Minitest::Unit
80
+ watch(%r{^test/(.*)\/?test_(.*)\.rb$})
81
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
82
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
83
+
84
+ # with Minitest::Spec
85
+ # watch(%r{^spec/(.*)_spec\.rb$})
86
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
87
+ # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
88
+
89
+ # Rails 4
90
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
91
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
92
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
93
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
94
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
95
+ # watch(%r{^test/.+_test\.rb$})
96
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
97
+
98
+ # Rails < 4
99
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
100
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
101
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
102
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Josh Bodah
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # DeadGems
2
+
3
+ lists your app's unused gems
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'dead_gems'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install dead_gems
20
+
21
+ ## Usage
22
+
23
+ `DeadGems::find` is the main entry point. It takes the path to your project's root (which should contain your Gemfile) and a shell command to use in that project that should touch as much of your code as possible.
24
+
25
+ **NOTE** This will take a long time as it uses [TracePoint](http://ruby-doc.org/core-2.0.0/TracePoint.html) to check the source location of every method call to see if the code being leveraged is in a gem directory.
26
+
27
+ ```rb
28
+ # First make sure to backup any changes you have (e.g. commit them to git, stash them, etc)
29
+ $ irb
30
+ $ irb(main)> require 'dead_gems'
31
+ $ irb(main)> DeadGems.find('~/my_slow_project', 'bundle exec rake test')
32
+ ```
33
+
34
+ This will run my project's tests and output all of the gems that aren't used in my tests.
35
+
36
+ ## Contributing
37
+
38
+ 1. Fork it ( https://github.com/[my-github-username]/dead_gems/fork )
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/dead_gems.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dead_gems/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "dead_gems"
8
+ spec.version = DeadGems::VERSION
9
+ spec.authors = ["Josh Bodah"]
10
+ spec.email = ["jb3689@yahoo.com"]
11
+ spec.summary = %q{a gem for finding unused gems in your project}
12
+ spec.description = %q{dead_gems works by analyzing your gem dependencies and running an exerciser script to see if any of them were used}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "minitest"
24
+ spec.add_development_dependency "guard"
25
+ spec.add_development_dependency "guard-minitest"
26
+
27
+ spec.add_dependency "thor"
28
+ spec.add_dependency "spy_rb"
29
+ end
data/dummy/.gitignore ADDED
@@ -0,0 +1,16 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
data/dummy/Gemfile ADDED
@@ -0,0 +1,45 @@
1
+ source 'https://rubygems.org'
2
+
3
+
4
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
5
+ gem 'rails', '4.1.5'
6
+ # Use sqlite3 as the database for Active Record
7
+ gem 'sqlite3'
8
+ # Use SCSS for stylesheets
9
+ gem 'sass-rails', '~> 4.0.3'
10
+ # Use Uglifier as compressor for JavaScript assets
11
+ gem 'uglifier', '>= 1.3.0'
12
+ # Use CoffeeScript for .js.coffee assets and views
13
+ gem 'coffee-rails', '~> 4.0.0'
14
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
15
+ # gem 'therubyracer', platforms: :ruby
16
+
17
+ # Use jquery as the JavaScript library
18
+ gem 'jquery-rails'
19
+ # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
20
+ gem 'turbolinks'
21
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
22
+ gem 'jbuilder', '~> 2.0'
23
+ # bundle exec rake doc:rails generates the API under doc/api.
24
+ gem 'sdoc', '~> 0.4.0', group: :doc
25
+
26
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
27
+ gem 'spring', group: :development
28
+
29
+ # Use ActiveModel has_secure_password
30
+ # gem 'bcrypt', '~> 3.1.7'
31
+
32
+ # Use unicorn as the app server
33
+ # gem 'unicorn'
34
+
35
+ # Use Capistrano for deployment
36
+ # gem 'capistrano-rails', group: :development
37
+
38
+ # Use debugger
39
+ # gem 'debugger', group: [:development, :test]
40
+
41
+ # Used
42
+ gem 'timecop'
43
+
44
+ # Unused
45
+ gem 'factory_girl'
@@ -0,0 +1,130 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ actionmailer (4.1.5)
5
+ actionpack (= 4.1.5)
6
+ actionview (= 4.1.5)
7
+ mail (~> 2.5.4)
8
+ actionpack (4.1.5)
9
+ actionview (= 4.1.5)
10
+ activesupport (= 4.1.5)
11
+ rack (~> 1.5.2)
12
+ rack-test (~> 0.6.2)
13
+ actionview (4.1.5)
14
+ activesupport (= 4.1.5)
15
+ builder (~> 3.1)
16
+ erubis (~> 2.7.0)
17
+ activemodel (4.1.5)
18
+ activesupport (= 4.1.5)
19
+ builder (~> 3.1)
20
+ activerecord (4.1.5)
21
+ activemodel (= 4.1.5)
22
+ activesupport (= 4.1.5)
23
+ arel (~> 5.0.0)
24
+ activesupport (4.1.5)
25
+ i18n (~> 0.6, >= 0.6.9)
26
+ json (~> 1.7, >= 1.7.7)
27
+ minitest (~> 5.1)
28
+ thread_safe (~> 0.1)
29
+ tzinfo (~> 1.1)
30
+ arel (5.0.1.20140414130214)
31
+ builder (3.2.2)
32
+ coffee-rails (4.0.1)
33
+ coffee-script (>= 2.2.0)
34
+ railties (>= 4.0.0, < 5.0)
35
+ coffee-script (2.4.1)
36
+ coffee-script-source
37
+ execjs
38
+ coffee-script-source (1.9.1.1)
39
+ erubis (2.7.0)
40
+ execjs (2.5.2)
41
+ factory_girl (4.4.0)
42
+ activesupport (>= 3.0.0)
43
+ hike (1.2.3)
44
+ i18n (0.7.0)
45
+ jbuilder (2.3.1)
46
+ activesupport (>= 3.0.0, < 5)
47
+ multi_json (~> 1.2)
48
+ jquery-rails (3.1.3)
49
+ railties (>= 3.0, < 5.0)
50
+ thor (>= 0.14, < 2.0)
51
+ json (1.8.3)
52
+ mail (2.5.4)
53
+ mime-types (~> 1.16)
54
+ treetop (~> 1.4.8)
55
+ mime-types (1.25.1)
56
+ minitest (5.7.0)
57
+ multi_json (1.11.2)
58
+ polyglot (0.3.5)
59
+ rack (1.5.5)
60
+ rack-test (0.6.3)
61
+ rack (>= 1.0)
62
+ rails (4.1.5)
63
+ actionmailer (= 4.1.5)
64
+ actionpack (= 4.1.5)
65
+ actionview (= 4.1.5)
66
+ activemodel (= 4.1.5)
67
+ activerecord (= 4.1.5)
68
+ activesupport (= 4.1.5)
69
+ bundler (>= 1.3.0, < 2.0)
70
+ railties (= 4.1.5)
71
+ sprockets-rails (~> 2.0)
72
+ railties (4.1.5)
73
+ actionpack (= 4.1.5)
74
+ activesupport (= 4.1.5)
75
+ rake (>= 0.8.7)
76
+ thor (>= 0.18.1, < 2.0)
77
+ rake (10.4.2)
78
+ rdoc (4.2.0)
79
+ json (~> 1.4)
80
+ sass (3.2.19)
81
+ sass-rails (4.0.5)
82
+ railties (>= 4.0.0, < 5.0)
83
+ sass (~> 3.2.2)
84
+ sprockets (~> 2.8, < 3.0)
85
+ sprockets-rails (~> 2.0)
86
+ sdoc (0.4.1)
87
+ json (~> 1.7, >= 1.7.7)
88
+ rdoc (~> 4.0)
89
+ spring (1.3.6)
90
+ sprockets (2.12.4)
91
+ hike (~> 1.2)
92
+ multi_json (~> 1.0)
93
+ rack (~> 1.0)
94
+ tilt (~> 1.1, != 1.3.0)
95
+ sprockets-rails (2.3.2)
96
+ actionpack (>= 3.0)
97
+ activesupport (>= 3.0)
98
+ sprockets (>= 2.8, < 4.0)
99
+ sqlite3 (1.3.10)
100
+ thor (0.19.1)
101
+ thread_safe (0.3.5)
102
+ tilt (1.4.1)
103
+ timecop (0.5.4)
104
+ treetop (1.4.15)
105
+ polyglot
106
+ polyglot (>= 0.3.1)
107
+ turbolinks (2.5.3)
108
+ coffee-rails
109
+ tzinfo (1.2.2)
110
+ thread_safe (~> 0.1)
111
+ uglifier (2.7.1)
112
+ execjs (>= 0.3.0)
113
+ json (>= 1.8.0)
114
+
115
+ PLATFORMS
116
+ ruby
117
+
118
+ DEPENDENCIES
119
+ coffee-rails (~> 4.0.0)
120
+ factory_girl
121
+ jbuilder (~> 2.0)
122
+ jquery-rails
123
+ rails (= 4.1.5)
124
+ sass-rails (~> 4.0.3)
125
+ sdoc (~> 0.4.0)
126
+ spring
127
+ sqlite3
128
+ timecop
129
+ turbolinks
130
+ uglifier (>= 1.3.0)
data/dummy/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
data/dummy/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ class User
2
+ # Superficial example
3
+ def time
4
+ Timecop.freeze do
5
+ return Time.now
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/dummy/bin/bundle ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
data/dummy/bin/rails ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path("../spring", __FILE__)
4
+ rescue LoadError
5
+ end
6
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
7
+ require_relative '../config/boot'
8
+ require 'rails/commands'
data/dummy/bin/rake ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path("../spring", __FILE__)
4
+ rescue LoadError
5
+ end
6
+ require_relative '../config/boot'
7
+ require 'rake'
8
+ Rake.application.run
data/dummy/bin/spring ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast.
4
+ # It gets overwritten when you run the `spring binstub` command.
5
+
6
+ unless defined?(Spring)
7
+ require "rubygems"
8
+ require "bundler"
9
+
10
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11
+ Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12
+ gem "spring", match[1]
13
+ require "spring/binstub"
14
+ end
15
+ end
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+ end
23
+ end
@@ -0,0 +1,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!