softwear 2.0.0 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d715e0759e33a014c97ab25bdd01db678ab666d3
4
- data.tar.gz: 66ad37169e8051c909ca91c326dba79f1fb20bb3
3
+ metadata.gz: 01de1828d719062f288103e349d925bba0938087
4
+ data.tar.gz: 87d00d08d8cb2948cbc4227ef9e27f1eff9fe275
5
5
  SHA512:
6
- metadata.gz: 4100ed66d9ea3b8c838efd51d85a33fe9c9fba334b02145e12003329d8b503c27476b7831cc8e8ba38a60ca40344a9f6a24252701cac8448e55d506c75587fb5
7
- data.tar.gz: aa8d8df330bb7564b5a0203758c67024bfa62f65b644633e9f7d9a18d45769c147693c772be87c8af7e3329aeb6482ccf8ac6967075d9aa8dcdce6a852ba0083
6
+ metadata.gz: 5ca31e319e04e82c2d0126f48f360d3f47e290264be6ce0d86fec2cb5b97dfbfaa002eff73a6940a06840c63313cf372ebaf7adb2cdcdd637f3d01ee34a08609
7
+ data.tar.gz: ca5e01c2bf1105a108d33843496cef021e1da0b730d82496a9b9a6909b2416226d26f733b0a91944f72993589c276f7c4fe57ac53c53b90b762ab7ec28c5cb1c
data/Rakefile CHANGED
@@ -5,6 +5,7 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  require 'rdoc/task'
8
+ require 'bundler/gem_tasks'
8
9
 
9
10
  RDoc::Task.new(:rdoc) do |rdoc|
10
11
  rdoc.rdoc_dir = 'rdoc'
@@ -1,4 +1,5 @@
1
1
  module Softwear
2
2
  class ApplicationController < ActionController::Base
3
+ include Softwear::ErrorCatcher
3
4
  end
4
5
  end
@@ -23,7 +23,7 @@ module Softwear
23
23
  end
24
24
 
25
25
  ErrorReportMailer.send_report(user, params).deliver
26
- flash[:success] = 'Sent error report. Sorry about that.'
26
+ flash[:success] = 'Sent error report. Sorry about that and thank you for your submission.'
27
27
 
28
28
  if user
29
29
  redirect_to '/'
data/bin/softwear ADDED
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'softwear/lib'
4
+
5
+ if ARGV.length > 0 && ARGV[0] == 'update'
6
+ old_gemfile = File.open('Gemfile').read.gsub(/\r\n?/, "\n")
7
+ gemfile = []
8
+
9
+ handler = nil
10
+ append_line = nil
11
+
12
+ injected_gems = false
13
+
14
+ ignore_line = lambda do |line|
15
+ if line.include? Softwear::Lib::GEMFILE_CLOSER
16
+ gemfile << line
17
+ handler = append_line
18
+ end
19
+ end
20
+
21
+ append_line = lambda do |line|
22
+ gemfile << line
23
+ if line.include? Softwear::Lib::GEMFILE_OPENER
24
+ puts "Updating common gems"
25
+ gemfile << Softwear::Lib::COMMON_GEMS
26
+ injected_gems = true
27
+ handler = ignore_line
28
+ end
29
+ end
30
+
31
+ handler = append_line
32
+ old_gemfile.each_line do |line|
33
+ handler.call(line)
34
+ end
35
+
36
+ unless injected_gems
37
+ puts "Adding common gems - check for duplicates!"
38
+ gemfile << "\n" + Softwear::Lib::GEMFILE_OPENER + "\n"
39
+ gemfile << Softwear::Lib::COMMON_GEMS
40
+ gemfile << Softwear::Lib::GEMFILE_CLOSER + "\n"
41
+ end
42
+
43
+ File.open('Gemfile', 'w') do |file|
44
+ gemfile.each do |line|
45
+ file.write(line)
46
+ end
47
+ end
48
+ puts "Done!"
49
+ else
50
+ puts "Run `softwear update` to update your gemfile's common dependencies"
51
+ end
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if ENV['TRAVIS_BRANCH'].strip == 'master'
4
+ exec "export RAILS_ENV=development; bundle install && bundle exec cap production deploy"
5
+ else
6
+ puts "Not on master branch - no deploy."
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Softwear
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.3"
3
3
  end
data/lib/softwear.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'softwear/engine'
2
2
  require 'softwear/version'
3
- require 'softwear/error_catcher'
4
3
 
5
4
  require "softwear/library/spec"
6
5
  require "softwear/library/api_controller"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softwear
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Baillie
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-23 00:00:00.000000000 Z
12
+ date: 2016-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -45,6 +45,20 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.2.5
48
+ - !ruby/object:Gem::Dependency
49
+ name: inherited_resources
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
48
62
  - !ruby/object:Gem::Dependency
49
63
  name: sqlite3
50
64
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +115,8 @@ dependencies:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
117
  version: 3.2.0
104
- description: Re-worked softwear-lib gem.
118
+ description: Re-worked from softwear-lib gem. Error reporting and common gems and
119
+ logic for all softwear apps.
105
120
  email:
106
121
  - nigel@annarbortees.com
107
122
  - stefan@annarbortees.com
@@ -116,6 +131,7 @@ files:
116
131
  - app/assets/javascripts/softwear/modals.js.coffee
117
132
  - app/assets/stylesheets/softwear/application.css
118
133
  - app/controllers/softwear/application_controller.rb
134
+ - app/controllers/softwear/concerns/error_catcher.rb
119
135
  - app/controllers/softwear/error_reports_controller.rb
120
136
  - app/helpers/softwear/application_helper.rb
121
137
  - app/helpers/softwear/emails_helper.rb
@@ -126,6 +142,8 @@ files:
126
142
  - app/views/softwear/errors/internal_server_error.html.erb
127
143
  - app/views/softwear/errors/internal_server_error.js.erb
128
144
  - bin/rails
145
+ - bin/softwear
146
+ - bin/softwear-deploy
129
147
  - config/routes.rb
130
148
  - lib/softwear.rb
131
149
  - lib/softwear/auth/belongs_to_user.rb
@@ -137,7 +155,6 @@ files:
137
155
  - lib/softwear/auth/stubbed_model.rb
138
156
  - lib/softwear/auth/token_authentication.rb
139
157
  - lib/softwear/engine.rb
140
- - lib/softwear/error_catcher.rb
141
158
  - lib/softwear/library/api_controller.rb
142
159
  - lib/softwear/library/capistrano.rb
143
160
  - lib/softwear/library/controller_authentication.rb
@@ -152,7 +169,7 @@ metadata: {}
152
169
  post_install_message:
153
170
  rdoc_options: []
154
171
  require_paths:
155
- - softwear
172
+ - lib
156
173
  required_ruby_version: !ruby/object:Gem::Requirement
157
174
  requirements:
158
175
  - - ">="