dummy-application 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d957182a40321aa91451a3ad6cc9b92b36b76577
4
+ data.tar.gz: a90092d41bbfb49a5b784f5f5cc750c12b684c0e
5
+ SHA512:
6
+ metadata.gz: e43321cd4b614ccb06babc21c16f74da4a42bf207ac3879623b4dd5d7892a5d671466cf32f31a6087200fe51ed40cebd592ebc9f98eda99a69560689f4e21843
7
+ data.tar.gz: d2a6864ece7b3e6da513df360986686c1ef260dedf8ce7e7f60a9e44a3d2a22641793c6683ad340e06771f5bf3651e9c7060ecc5e104d24a64234ba874f9fff8
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Adam Hunter
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.
@@ -0,0 +1,31 @@
1
+ # Dummy::Application
2
+
3
+ Provides a Rails application for testing rubygems that use rails.
4
+ Requires Bundler and Rspec.
5
+
6
+ ## Installation
7
+
8
+ Add this line to your gemspec:
9
+ ```ruby
10
+ spec.add_development_dependency 'dummy-application'
11
+ ```
12
+
13
+ Add this line to your spec helper:
14
+ ```ruby
15
+ require 'dummy/application'
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ Dummy Application provides all of the bootstrap code to have a rails
21
+ application available to your gem's tests. It sets the root of the rails
22
+ application to '/your/gem/path/spec/dummy'. If you need to add application
23
+ code for your specs place them in 'spec/dummy/app'.
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/dummy-application/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "dummy-application"
7
+ spec.version = "1.0.0"
8
+ spec.authors = ["Adam Hunter"]
9
+ spec.email = ["adamhunter@me.com"]
10
+ spec.summary = %q[Provide a base Rails application for usage in testing rubygems]
11
+ spec.homepage = "https://github.com/adamhunter/dummy-application"
12
+ spec.license = "MIT"
13
+
14
+ spec.files = `git ls-files -z`.split("\x0")
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_dependency "rails", ">= 3.0"
20
+ spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "rspec-rails", "~> 2.14.2"
22
+ spec.add_development_dependency "rake"
23
+ end
@@ -0,0 +1,34 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+ # rspec sets ENV['BUNDLE_GEMFILE']
3
+
4
+ require 'rubygems'
5
+ require 'bundler'
6
+
7
+ Bundler.setup
8
+
9
+ require "action_controller/railtie"
10
+
11
+ Bundler.require
12
+
13
+ ApplicationController = Class.new(ActionController::Base)
14
+
15
+ module Dummy
16
+ def self.gem_root
17
+ Pathname.new(File.dirname ENV['BUNDLE_GEMFILE'])
18
+ end
19
+
20
+ def self.rails_root
21
+ Pathname.new(gem_root).join(*%w[spec dummy])
22
+ end
23
+
24
+ class Application < ::Rails::Application
25
+ config.root = Dummy.rails_root
26
+ config.logger = Logger.new("/dev/null")
27
+ config.eager_load = Rails.env.production?
28
+ config.cache_classes = !Rails.env.development?
29
+ config.active_support.deprecation = :stderr
30
+ config.secret_token = 'http://s3-ec.buzzfed.com/static/enhanced/webdr03/2013/5/25/8/anigif_enhanced-buzz-11857-1369483324-0.gif'
31
+ end
32
+ end
33
+
34
+ Dummy::Application.initialize!
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Dummy::Application do
4
+
5
+ it "is a Rails Application" do
6
+ expect(Rails.application).to be_a_kind_of described_class
7
+ end
8
+
9
+ it "sets the root do spec/dummy" do
10
+ expect(Rails.root.to_s).to eq File.expand_path('..', __FILE__)
11
+ end
12
+
13
+ end
@@ -0,0 +1,7 @@
1
+ require 'dummy/application'
2
+ RSpec.configure do |config|
3
+ config.treat_symbols_as_metadata_keys_with_true_values = true
4
+ config.run_all_when_everything_filtered = true
5
+ config.filter_run :focus
6
+ config.order = 'random'
7
+ end
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dummy-application
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Adam Hunter
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.14.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.14.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email:
71
+ - adamhunter@me.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - dummy-application.gemspec
83
+ - lib/dummy/application.rb
84
+ - spec/dummy/application_spec.rb
85
+ - spec/spec_helper.rb
86
+ homepage: https://github.com/adamhunter/dummy-application
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.2.2
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Provide a base Rails application for usage in testing rubygems
110
+ test_files:
111
+ - spec/dummy/application_spec.rb
112
+ - spec/spec_helper.rb