ratchetio 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/Rakefile +7 -1
- data/lib/generators/ratchetio/ratchetio_generator.rb +1 -1
- data/lib/ratchetio/configuration.rb +9 -10
- data/lib/ratchetio/rails/controller_methods.rb +3 -3
- data/lib/ratchetio/rails/middleware/exception_catcher.rb +2 -4
- data/lib/ratchetio/version.rb +1 -1
- data/lib/ratchetio.rb +87 -60
- data/ratchetio.gemspec +16 -1
- data/spec/controllers/home_controller_spec.rb +41 -0
- data/spec/dummyapp/.gitignore +74 -0
- data/spec/dummyapp/Gemfile +19 -0
- data/spec/dummyapp/README +19 -0
- data/spec/dummyapp/README.textile +80 -0
- data/spec/dummyapp/Rakefile +7 -0
- data/spec/dummyapp/app/assets/javascripts/application.js +15 -0
- data/spec/dummyapp/app/assets/javascripts/home.js.coffee +3 -0
- data/spec/dummyapp/app/assets/stylesheets/application.css.scss +37 -0
- data/spec/dummyapp/app/assets/stylesheets/home.css.scss +3 -0
- data/spec/dummyapp/app/controllers/application_controller.rb +3 -0
- data/spec/dummyapp/app/controllers/home_controller.rb +21 -0
- data/spec/dummyapp/app/controllers/users_controller.rb +12 -0
- data/spec/dummyapp/app/helpers/application_helper.rb +2 -0
- data/spec/dummyapp/app/helpers/home_helper.rb +2 -0
- data/spec/dummyapp/app/mailers/.gitkeep +0 -0
- data/spec/dummyapp/app/models/.gitkeep +0 -0
- data/spec/dummyapp/app/models/user.rb +11 -0
- data/spec/dummyapp/app/views/devise/registrations/edit.html.erb +27 -0
- data/spec/dummyapp/app/views/devise/registrations/new.html.erb +20 -0
- data/spec/dummyapp/app/views/devise/shared/_links.html.erb +25 -0
- data/spec/dummyapp/app/views/home/cause_exception.html.erb +1 -0
- data/spec/dummyapp/app/views/home/index.html.erb +4 -0
- data/spec/dummyapp/app/views/home/report_exception.html.erb +1 -0
- data/spec/dummyapp/app/views/layouts/_messages.html.erb +5 -0
- data/spec/dummyapp/app/views/layouts/_navigation.html.erb +21 -0
- data/spec/dummyapp/app/views/layouts/application.html.erb +25 -0
- data/spec/dummyapp/app/views/users/index.html.erb +8 -0
- data/spec/dummyapp/app/views/users/show.html.erb +3 -0
- data/spec/dummyapp/config/application.rb +76 -0
- data/spec/dummyapp/config/boot.rb +6 -0
- data/spec/dummyapp/config/cucumber.yml +8 -0
- data/spec/dummyapp/config/environment.rb +5 -0
- data/spec/dummyapp/config/environments/development.rb +54 -0
- data/spec/dummyapp/config/environments/production.rb +87 -0
- data/spec/dummyapp/config/environments/test.rb +41 -0
- data/spec/dummyapp/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummyapp/config/initializers/devise.rb +233 -0
- data/spec/dummyapp/config/initializers/generators.rb +2 -0
- data/spec/dummyapp/config/initializers/inflections.rb +15 -0
- data/spec/dummyapp/config/initializers/mime_types.rb +5 -0
- data/spec/dummyapp/config/initializers/ratchetio.rb +20 -0
- data/spec/dummyapp/config/initializers/secret_token.rb +7 -0
- data/spec/dummyapp/config/initializers/session_store.rb +8 -0
- data/spec/dummyapp/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummyapp/config/locales/devise.en.yml +58 -0
- data/spec/dummyapp/config/locales/en.yml +5 -0
- data/spec/dummyapp/config/routes.rb +11 -0
- data/spec/dummyapp/config.ru +4 -0
- data/spec/dummyapp/db/migrate/20121121184652_devise_create_users.rb +46 -0
- data/spec/dummyapp/db/migrate/20121121184654_add_name_to_users.rb +5 -0
- data/spec/dummyapp/db/schema.rb +35 -0
- data/spec/dummyapp/db/seeds.rb +12 -0
- data/spec/dummyapp/lib/assets/.gitkeep +0 -0
- data/spec/dummyapp/lib/tasks/.gitkeep +0 -0
- data/spec/dummyapp/lib/tasks/cucumber.rake +65 -0
- data/spec/dummyapp/public/404.html +26 -0
- data/spec/dummyapp/public/422.html +26 -0
- data/spec/dummyapp/public/500.html +25 -0
- data/spec/dummyapp/public/favicon.ico +0 -0
- data/spec/dummyapp/public/humans.txt +20 -0
- data/spec/dummyapp/public/robots.txt +5 -0
- data/spec/dummyapp/script/cucumber +10 -0
- data/spec/dummyapp/script/rails +6 -0
- data/spec/dummyapp/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/dummyapp/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/dummyapp/vendor/plugins/.gitkeep +0 -0
- data/spec/ratchetio_spec.rb +233 -1
- data/spec/spec_helper.rb +36 -0
- data/spec/support/devise.rb +3 -0
- metadata +350 -3
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
**0.4.3**
|
4
|
+
- Add RSpec test suite. A few minor code changes.
|
5
|
+
|
6
|
+
**0.4.2**
|
7
|
+
- Add "ignore" filter level to completely ignore exceptions by class.
|
8
|
+
|
3
9
|
**0.4.1**
|
4
10
|
- Recursively filter files out of the params hash. Thanks to [trisweb](https://github.com/trisweb) for the pull request.
|
5
11
|
|
data/README.md
CHANGED
@@ -105,3 +105,5 @@ If you run into any issues, please email us at `support@ratchet.io`
|
|
105
105
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
106
106
|
4. Push to the branch (`git push origin my-new-feature`)
|
107
107
|
5. Create new Pull Request
|
108
|
+
|
109
|
+
We're using RSpec for testing. Run the test suite with `rake spec`. Tests for pull requests are appreciated but not required. (If you don't include a test, we'll write one before merging.)
|
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require 'rails/generators/named_base'
|
|
4
4
|
module Ratchetio
|
5
5
|
module Generators
|
6
6
|
class RatchetioGenerator < ::Rails::Generators::Base
|
7
|
-
argument :access_token, :type => :string, :banner =>
|
7
|
+
argument :access_token, :type => :string, :banner => 'access_token'
|
8
8
|
|
9
9
|
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
10
10
|
|
@@ -2,20 +2,19 @@ module Ratchetio
|
|
2
2
|
class Configuration
|
3
3
|
|
4
4
|
attr_accessor :access_token
|
5
|
-
attr_accessor :environment
|
6
|
-
attr_accessor :root
|
7
5
|
attr_accessor :branch
|
8
|
-
attr_accessor :framework
|
9
6
|
attr_accessor :endpoint
|
10
7
|
attr_accessor :exception_level_filters
|
8
|
+
attr_accessor :environment
|
9
|
+
attr_accessor :framework
|
10
|
+
attr_accessor :logger
|
11
11
|
attr_accessor :person_method
|
12
12
|
attr_accessor :person_id_method
|
13
13
|
attr_accessor :person_username_method
|
14
14
|
attr_accessor :person_email_method
|
15
|
+
attr_accessor :root
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
DEFAULT_ENDPOINT = "https://submit.ratchet.io/api/1/item/"
|
17
|
+
DEFAULT_ENDPOINT = 'https://submit.ratchet.io/api/1/item/'
|
19
18
|
|
20
19
|
def initialize
|
21
20
|
@endpoint = DEFAULT_ENDPOINT
|
@@ -25,10 +24,10 @@ module Ratchetio
|
|
25
24
|
'AbstractController::ActionNotFound' => 'warning',
|
26
25
|
'ActionController::RoutingError' => 'warning'
|
27
26
|
}
|
28
|
-
@person_method =
|
29
|
-
@person_id_method =
|
30
|
-
@person_username_method =
|
31
|
-
@person_email_method =
|
27
|
+
@person_method = 'current_user'
|
28
|
+
@person_id_method = 'id'
|
29
|
+
@person_username_method = 'username'
|
30
|
+
@person_email_method = 'email'
|
32
31
|
end
|
33
32
|
|
34
33
|
# allow params to be read like a hash
|
@@ -45,7 +45,7 @@ module Ratchetio
|
|
45
45
|
:size => v.tempfile.size
|
46
46
|
}
|
47
47
|
rescue
|
48
|
-
filtered[k] =
|
48
|
+
filtered[k] = 'Uploaded file'
|
49
49
|
end
|
50
50
|
elsif v.is_a? Hash
|
51
51
|
filtered[k] = ratchetio_filter_params v
|
@@ -67,11 +67,11 @@ module Ratchetio
|
|
67
67
|
|
68
68
|
def ratchetio_user_ip
|
69
69
|
# priority: X-Real-Ip, then X-Forwarded-For, then request.remote_ip
|
70
|
-
real_ip = request.env[
|
70
|
+
real_ip = request.env['HTTP_X_REAL_IP']
|
71
71
|
if real_ip
|
72
72
|
return real_ip
|
73
73
|
end
|
74
|
-
forwarded_for = request.env[
|
74
|
+
forwarded_for = request.env['HTTP_X_FORWARDED_FOR']
|
75
75
|
if forwarded_for
|
76
76
|
return forwarded_for
|
77
77
|
end
|
@@ -7,16 +7,14 @@ module Ratchetio
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def render_exception_with_ratchetio(env, exception)
|
10
|
-
# wrap everything in a begin-rescue block
|
11
10
|
begin
|
12
11
|
controller = env['action_controller.instance']
|
13
12
|
request_data = controller.try(:ratchetio_request_data)
|
14
13
|
person_data = controller.try(:ratchetio_person_data)
|
15
14
|
Ratchetio.report_exception(exception, request_data, person_data)
|
16
|
-
rescue
|
15
|
+
rescue => e
|
17
16
|
# TODO use logger here?
|
18
|
-
puts "[Ratchet.io] Exception while reporting exception to Ratchet.io: "
|
19
|
-
puts exc
|
17
|
+
puts "[Ratchet.io] Exception while reporting exception to Ratchet.io: #{e}"
|
20
18
|
end
|
21
19
|
|
22
20
|
# now continue as normal
|
data/lib/ratchetio/version.rb
CHANGED
data/lib/ratchetio.rb
CHANGED
@@ -7,75 +7,106 @@ require 'ratchetio/configuration'
|
|
7
7
|
require 'ratchetio/railtie'
|
8
8
|
|
9
9
|
module Ratchetio
|
10
|
-
|
11
10
|
class << self
|
12
11
|
attr_writer :configuration
|
13
12
|
|
13
|
+
# Configures the gem.
|
14
|
+
#
|
15
|
+
# Call on app startup to set the `access_token` (required) and other config params.
|
16
|
+
# In a Rails app, this is called by `config/initializers/ratchetio.rb` which is generated
|
17
|
+
# with `rails generate ratchetio access-token-here`
|
18
|
+
#
|
19
|
+
# @example
|
20
|
+
# Ratchetio.configure do |config|
|
21
|
+
# config.access_token = 'abcdefg'
|
22
|
+
# end
|
14
23
|
def configure
|
15
24
|
yield(configuration)
|
16
25
|
end
|
17
26
|
|
27
|
+
# Returns the configuration object.
|
28
|
+
#
|
29
|
+
# @return [Ratchetio::Configuration] The configuration object
|
18
30
|
def configuration
|
19
31
|
@configuration ||= Configuration.new
|
20
32
|
end
|
21
33
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
logger.error "[Ratchet.io] Error reporting exception to Ratchet.io: #{e}"
|
34
|
+
# Reports an exception to Ratchet.io
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# begin
|
38
|
+
# foo = bar
|
39
|
+
# rescue => e
|
40
|
+
# Ratchetio.report_exception(e)
|
41
|
+
# end
|
42
|
+
#
|
43
|
+
# @param exception [Exception] The exception object to report
|
44
|
+
# @param request_data [Hash] Data describing the request. Should be the result of calling
|
45
|
+
# `ratchetio_request_data`.
|
46
|
+
# @param person_data [Hash] Data describing the affected person. Should be the result of calling
|
47
|
+
# `ratchetio_person_data`
|
48
|
+
def report_exception(exception, request_data = nil, person_data = nil)
|
49
|
+
filtered_level = configuration.exception_level_filters[exception.class.name]
|
50
|
+
if filtered_level == 'ignore'
|
51
|
+
# ignored - do nothing
|
52
|
+
return
|
42
53
|
end
|
54
|
+
|
55
|
+
data = exception_data(exception, filtered_level)
|
56
|
+
data[:request] = request_data if request_data
|
57
|
+
data[:person] = person_data if person_data
|
58
|
+
|
59
|
+
payload = build_payload(data)
|
60
|
+
send_payload(payload)
|
61
|
+
rescue => e
|
62
|
+
logger.error "[Ratchet.io] Error reporting exception to Ratchet.io: #{e}"
|
43
63
|
end
|
44
64
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
65
|
+
# Reports an arbitrary message to Ratchet.io
|
66
|
+
#
|
67
|
+
# @example
|
68
|
+
# Ratchetio.report_message("User login failed", 'info', :user_id => 123)
|
69
|
+
#
|
70
|
+
# @param message [String] The message body. This will be used to identify the message within
|
71
|
+
# Ratchet. For best results, avoid putting variables in the message body; pass them as
|
72
|
+
# `extra_data` instead.
|
73
|
+
# @param level [String] The level. One of: 'critical', 'error', 'warning', 'info', 'debug'
|
74
|
+
# @param extra_data [Hash] Additional data to include alongside the body. Don't use 'body' as
|
75
|
+
# it is reserved.
|
76
|
+
def report_message(message, level = 'info', extra_data = {})
|
77
|
+
data = message_data(message, level, extra_data)
|
78
|
+
payload = build_payload(data)
|
79
|
+
send_payload(payload)
|
80
|
+
rescue => e
|
81
|
+
logger.error "[Ratchet.io] Error reporting message to Ratchet.io: #{e}"
|
62
82
|
end
|
63
83
|
|
64
|
-
|
84
|
+
private
|
85
|
+
|
86
|
+
def message_data(message, level, extra_data)
|
87
|
+
data = base_data(level)
|
88
|
+
|
89
|
+
data[:body] = {
|
90
|
+
:message => {
|
91
|
+
:body => message.to_s
|
92
|
+
}
|
93
|
+
}
|
94
|
+
data[:body][:message].merge!(extra_data)
|
95
|
+
data[:server] = server_data
|
96
|
+
|
97
|
+
data
|
98
|
+
end
|
65
99
|
|
66
100
|
def exception_data(exception, force_level = nil)
|
67
101
|
data = base_data
|
68
102
|
|
69
|
-
if force_level
|
70
|
-
data[:level] = force_level
|
71
|
-
end
|
103
|
+
data[:level] = force_level if force_level
|
72
104
|
|
73
105
|
# parse backtrace
|
74
|
-
frames =
|
75
|
-
exception.backtrace.each { |frame|
|
106
|
+
frames = exception.backtrace.map { |frame|
|
76
107
|
# parse the line
|
77
108
|
match = frame.match(/(.*):(\d+)(?::in `([^']+)')?/)
|
78
|
-
|
109
|
+
{ :filename => match[1], :lineno => match[2].to_i, :method => match[3] }
|
79
110
|
}
|
80
111
|
# reverse so that the order is as ratchet expects
|
81
112
|
frames.reverse!
|
@@ -100,7 +131,7 @@ module Ratchetio
|
|
100
131
|
end
|
101
132
|
|
102
133
|
def send_payload(payload)
|
103
|
-
logger.info
|
134
|
+
logger.info '[Ratchet.io] Sending payload'
|
104
135
|
|
105
136
|
uri = URI.parse(configuration.endpoint)
|
106
137
|
http = Net::HTTP.new(uri.host, uri.port)
|
@@ -112,11 +143,10 @@ module Ratchetio
|
|
112
143
|
response = http.request(request)
|
113
144
|
|
114
145
|
if response.code == '200'
|
115
|
-
logger.info
|
146
|
+
logger.info '[Ratchet.io] Success'
|
116
147
|
else
|
117
|
-
logger.warn "[Ratchet.io] Got unexpected status code from Ratchet.io api:
|
118
|
-
logger.info "[Ratchet.io] Response:"
|
119
|
-
logger.info response.body
|
148
|
+
logger.warn "[Ratchet.io] Got unexpected status code from Ratchet.io api: #{response.code}"
|
149
|
+
logger.info "[Ratchet.io] Response: #{response.body}"
|
120
150
|
end
|
121
151
|
end
|
122
152
|
|
@@ -128,16 +158,16 @@ module Ratchetio
|
|
128
158
|
ActiveSupport::JSON.encode(payload)
|
129
159
|
end
|
130
160
|
|
131
|
-
def base_data(level=
|
161
|
+
def base_data(level = 'error')
|
132
162
|
config = configuration
|
133
163
|
{
|
134
164
|
:timestamp => Time.now.to_i,
|
135
165
|
:environment => config.environment,
|
136
166
|
:level => level,
|
137
|
-
:language =>
|
167
|
+
:language => 'ruby',
|
138
168
|
:framework => config.framework,
|
139
169
|
:notifier => {
|
140
|
-
:name =>
|
170
|
+
:name => 'ratchetio-gem',
|
141
171
|
:version => VERSION
|
142
172
|
}
|
143
173
|
}
|
@@ -145,18 +175,15 @@ module Ratchetio
|
|
145
175
|
|
146
176
|
def server_data
|
147
177
|
config = configuration
|
178
|
+
|
148
179
|
data = {
|
149
180
|
:host => Socket.gethostname
|
150
181
|
}
|
151
|
-
if config.root
|
152
|
-
|
153
|
-
|
154
|
-
if config.branch
|
155
|
-
data[:branch] = config.branch
|
156
|
-
end
|
182
|
+
data[:root] = config.root.to_s if config.root
|
183
|
+
data[:branch] = config.branch if config.branch
|
184
|
+
|
157
185
|
data
|
158
186
|
end
|
159
187
|
|
160
188
|
end
|
161
189
|
end
|
162
|
-
|
data/ratchetio.gemspec
CHANGED
@@ -15,5 +15,20 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Ratchetio::VERSION
|
17
17
|
|
18
|
-
|
18
|
+
gem.add_development_dependency 'rspec-rails', '~> 2.12'
|
19
|
+
gem.add_development_dependency 'rails', '~> 3.2.9'
|
20
|
+
gem.add_development_dependency 'sqlite3'
|
21
|
+
gem.add_development_dependency 'jquery-rails'
|
22
|
+
gem.add_development_dependency 'jquery-rails'
|
23
|
+
|
24
|
+
gem.add_development_dependency 'rspec-rails', '>= 2.11.4'
|
25
|
+
gem.add_development_dependency 'database_cleaner', '>= 0.9.1'
|
26
|
+
gem.add_development_dependency 'email_spec', '>= 1.4.0'
|
27
|
+
gem.add_development_dependency 'cucumber-rails', '>= 1.3.0'
|
28
|
+
gem.add_development_dependency 'launchy', '>= 2.1.2'
|
29
|
+
#gem.add_development_dependency 'capybara', '>= 1.1.3'
|
30
|
+
gem.add_development_dependency 'factory_girl_rails', '>= 4.1.0'
|
31
|
+
gem.add_development_dependency 'devise', '>= 2.1.2'
|
32
|
+
gem.add_development_dependency 'quiet_assets', '>= 1.0.1'
|
33
|
+
|
19
34
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe HomeController do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
Ratchetio.configure do |config|
|
7
|
+
config.logger = logger_mock
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:logger_mock) { double("Rails.logger").as_null_object }
|
12
|
+
|
13
|
+
describe "GET 'index'" do
|
14
|
+
it "should be successful and report a message" do
|
15
|
+
logger_mock.should_receive(:info).with('[Ratchet.io] Sending payload')
|
16
|
+
get 'index'
|
17
|
+
response.should be_success
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "GET 'report_exception'" do
|
22
|
+
it "should raise a NameError and report an exception" do
|
23
|
+
logger_mock.should_receive(:info).with('[Ratchet.io] Sending payload')
|
24
|
+
|
25
|
+
get 'report_exception'
|
26
|
+
response.should be_success
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# TODO need to figure out how to make a test request that uses enough of the middleware
|
31
|
+
# that it invokes the ratchetio exception catcher. just plain "get 'some_url'" doesn't
|
32
|
+
# seem to work.
|
33
|
+
it "should report uncaught exceptions"
|
34
|
+
|
35
|
+
after(:each) do
|
36
|
+
Ratchetio.configure do |config|
|
37
|
+
config.logger = ::Rails.logger
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#----------------------------------------------------------------------------
|
2
|
+
# Ignore these files when commiting to a git repository.
|
3
|
+
#
|
4
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
5
|
+
#
|
6
|
+
# The original version of this file is found here:
|
7
|
+
# https://github.com/RailsApps/rails-composer/blob/master/files/gitignore.txt
|
8
|
+
#
|
9
|
+
# Corrections? Improvements? Create a GitHub issue:
|
10
|
+
# http://github.com/RailsApps/rails-composer/issues
|
11
|
+
#----------------------------------------------------------------------------
|
12
|
+
|
13
|
+
# bundler state
|
14
|
+
/.bundle
|
15
|
+
/vendor/bundle/
|
16
|
+
/vendor/ruby/
|
17
|
+
|
18
|
+
# minimal Rails specific artifacts
|
19
|
+
db/*.sqlite3
|
20
|
+
/log/*
|
21
|
+
/tmp/*
|
22
|
+
|
23
|
+
# various artifacts
|
24
|
+
**.war
|
25
|
+
*.rbc
|
26
|
+
*.sassc
|
27
|
+
.rspec
|
28
|
+
.redcar/
|
29
|
+
.sass-cache
|
30
|
+
/config/config.yml
|
31
|
+
/config/database.yml
|
32
|
+
/coverage.data
|
33
|
+
/coverage/
|
34
|
+
/db/*.javadb/
|
35
|
+
/db/*.sqlite3
|
36
|
+
/doc/api/
|
37
|
+
/doc/app/
|
38
|
+
/doc/features.html
|
39
|
+
/doc/specs.html
|
40
|
+
/public/cache
|
41
|
+
/public/stylesheets/compiled
|
42
|
+
/public/system/*
|
43
|
+
/spec/tmp/*
|
44
|
+
/cache
|
45
|
+
/capybara*
|
46
|
+
/capybara-*.html
|
47
|
+
/gems
|
48
|
+
/specifications
|
49
|
+
rerun.txt
|
50
|
+
pickle-email-*.html
|
51
|
+
|
52
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
53
|
+
# or operating system, you probably want to add a global ignore instead:
|
54
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
55
|
+
#
|
56
|
+
# Here are some files you may want to ignore globally:
|
57
|
+
|
58
|
+
# scm revert files
|
59
|
+
**.orig
|
60
|
+
|
61
|
+
# Mac finder artifacts
|
62
|
+
.DS_Store
|
63
|
+
|
64
|
+
# Netbeans project directory
|
65
|
+
/nbproject/
|
66
|
+
|
67
|
+
# RubyMine project files
|
68
|
+
.idea
|
69
|
+
|
70
|
+
# Textmate project files
|
71
|
+
/*.tmproj
|
72
|
+
|
73
|
+
# vim artifacts
|
74
|
+
**.swp
|
@@ -0,0 +1,19 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
gem 'rails', '3.2.9'
|
3
|
+
gem 'sqlite3'
|
4
|
+
group :assets do
|
5
|
+
gem 'sass-rails', '~> 3.2.3'
|
6
|
+
gem 'coffee-rails', '~> 3.2.1'
|
7
|
+
gem 'uglifier', '>= 1.0.3'
|
8
|
+
end
|
9
|
+
gem 'jquery-rails'
|
10
|
+
gem "rspec-rails", ">= 2.11.4", :group => [:development, :test]
|
11
|
+
gem "database_cleaner", ">= 0.9.1", :group => :test
|
12
|
+
gem "email_spec", ">= 1.4.0", :group => :test
|
13
|
+
gem "cucumber-rails", ">= 1.3.0", :group => :test, :require => false
|
14
|
+
gem "launchy", ">= 2.1.2", :group => :test
|
15
|
+
gem "capybara", ">= 1.1.3", :group => :test
|
16
|
+
gem "factory_girl_rails", ">= 4.1.0", :group => [:development, :test]
|
17
|
+
gem "devise", ">= 2.1.2"
|
18
|
+
gem "quiet_assets", ">= 1.0.1", :group => :development
|
19
|
+
gem "ratchetio", :path => "../.."
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Dummyapp
|
2
|
+
========================
|
3
|
+
|
4
|
+
This application was generated with the rails_apps_composer gem:
|
5
|
+
https://github.com/RailsApps/rails_apps_composer
|
6
|
+
provided by the RailsApps Project:
|
7
|
+
http://railsapps.github.com/
|
8
|
+
|
9
|
+
________________________
|
10
|
+
|
11
|
+
Recipes:
|
12
|
+
["controllers", "core", "email", "extras", "frontend", "gems", "git", "init", "models", "prelaunch", "railsapps", "readme", "routes", "saas", "setup", "testing", "views"]
|
13
|
+
|
14
|
+
Preferences:
|
15
|
+
{:git=>true, :railsapps=>"rails3-devise-rspec-cucumber", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"none", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"none", :quiet_assets=>true, :dev_webserver=>"webrick", :templates=>"erb"}
|
16
|
+
|
17
|
+
________________________
|
18
|
+
|
19
|
+
License
|
@@ -0,0 +1,80 @@
|
|
1
|
+
h1. Dummyapp
|
2
|
+
|
3
|
+
This application was generated with the "rails_apps_composer":https://github.com/RailsApps/rails_apps_composer gem provided by the "RailsApps Project":http://railsapps.github.com/.
|
4
|
+
|
5
|
+
h2. Diagnostics
|
6
|
+
|
7
|
+
This application was built with recipes that are known to work together.
|
8
|
+
|
9
|
+
This application was built with preferences that are known to work together.
|
10
|
+
|
11
|
+
If the application doesn't work as expected, please "report an issue":https://github.com/RailsApps/rails_apps_composer/issues and include these diagnostics:
|
12
|
+
|
13
|
+
We'd also like to know if you've found combinations of recipes or preferences that do work together.
|
14
|
+
|
15
|
+
Recipes:
|
16
|
+
["controllers", "core", "email", "extras", "frontend", "gems", "git", "init", "models", "prelaunch", "railsapps", "readme", "routes", "saas", "setup", "testing", "views"]
|
17
|
+
|
18
|
+
Preferences:
|
19
|
+
{:git=>true, :railsapps=>"rails3-devise-rspec-cucumber", :database=>"sqlite", :unit_test=>"rspec", :integration=>"cucumber", :fixtures=>"factory_girl", :frontend=>"none", :email=>"gmail", :authentication=>"devise", :devise_modules=>"default", :authorization=>"none", :starter_app=>"users_app", :form_builder=>"none", :quiet_assets=>true, :dev_webserver=>"webrick", :templates=>"erb"}
|
20
|
+
|
21
|
+
h2. Ruby on Rails
|
22
|
+
|
23
|
+
This application requires:
|
24
|
+
|
25
|
+
* Ruby version 1.9.3
|
26
|
+
* Rails version 3.2.9
|
27
|
+
|
28
|
+
Learn more about "Installing Rails":http://railsapps.github.com/installing-rails.html.
|
29
|
+
|
30
|
+
h2. Database
|
31
|
+
|
32
|
+
This application uses SQLite with ActiveRecord.
|
33
|
+
|
34
|
+
h2. Development
|
35
|
+
|
36
|
+
* Template Engine: ERB
|
37
|
+
* Testing Framework: RSpec and Factory Girl and Cucumber
|
38
|
+
* Front-end Framework: None
|
39
|
+
* Form Builder: None
|
40
|
+
* Authentication: Devise
|
41
|
+
* Authorization: None
|
42
|
+
|
43
|
+
h2. Email
|
44
|
+
|
45
|
+
The application is configured to send email using a Gmail account.
|
46
|
+
|
47
|
+
h2. Getting Started
|
48
|
+
|
49
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
50
|
+
|
51
|
+
h2. Documentation and Support
|
52
|
+
|
53
|
+
This is the only documentation.
|
54
|
+
|
55
|
+
h4. Issues
|
56
|
+
|
57
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
58
|
+
|
59
|
+
h2. Similar Projects
|
60
|
+
|
61
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
62
|
+
|
63
|
+
h2. Contributing
|
64
|
+
|
65
|
+
If you make improvements to this application, please share with others.
|
66
|
+
|
67
|
+
* Fork the project on GitHub.
|
68
|
+
* Make your feature addition or bug fix.
|
69
|
+
* Commit with Git.
|
70
|
+
* Send the author a pull request.
|
71
|
+
|
72
|
+
If you add functionality to this application, create an alternative implementation, or build an application that is similar, please contact me and I'll add a note to the README so that others can find your work.
|
73
|
+
|
74
|
+
h2. Credits
|
75
|
+
|
76
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
77
|
+
|
78
|
+
h2. License
|
79
|
+
|
80
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummyapp::Application.load_tasks
|
@@ -0,0 +1,15 @@
|
|
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
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|