grape-starter 0.8.4 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c784e58c2cc7e636d53f3f780155ad9b63c67ea4
4
- data.tar.gz: 9d73dd73328a762aaccb3d8a7a5189d4050137e7
3
+ metadata.gz: ac4a3b4fcc54cc1ab74b2f305b238f008241564c
4
+ data.tar.gz: 325b939a9e383dfcca234a7218aba8d4bd3a62ab
5
5
  SHA512:
6
- metadata.gz: 9cf56c31de8fb7a4d5d0c17d20481ebbcb3b72de3589b33b800ebd7ac5cb08a1473f7fe85ea3b620a0c5ff5f3743315af1cf964c52a48989b5be8ba4765a311f
7
- data.tar.gz: 9f3f9f378ba76af98a8313b2a84ec668655e496089eaacc5427f0602e109c84e243f71e5f4b94aa1214bdbe0698c7672252ebc298ca13acdb3b6dae3a1556937
6
+ metadata.gz: 898bbcd8fdb4101bc3b33a7f1bd011d1c3629bd11d8d00e4a44cdfee99f97c217021d849c6456a63914abc23a98c3732cfec5651175806b1c7d0dc97a6e6c2ac
7
+ data.tar.gz: e0e2c5e4c1370764d9998d224cdf65a82301c17235d76ce93821d4e8678defc4b046df82fd82038ddf61fe8407e35d73d1cbf3f116217bd9708e3a6b9aaf7152
@@ -7,9 +7,8 @@ before_install:
7
7
  - gem install bundler
8
8
 
9
9
  rvm:
10
- - 2.4.1
11
- - 2.3.4
12
- - 2.2.7
10
+ - 2.4.2
11
+ - 2.3.5
13
12
  - ruby-head
14
13
 
15
14
  matrix:
@@ -2,6 +2,12 @@
2
2
 
3
3
  - contributions
4
4
 
5
+ ### 0.8.5
6
+
7
+ - [cbea8](https://github.com/LeFnord/grape-starter/commit/fa5edb5dc7e0883ff099e297e9cbd5bd5ebcbea8) - DRYs up template code; passes rubocop 0.51.0
8
+
9
+ - [6bbe7](https://github.com/LeFnord/grape-starter/commit/a224b5d8dfa001cb1e8dec3b1a1e28fc9826bbe7) - avoids overriding of dev db by running specs; fixes syntox error
10
+
5
11
  ### 0.8.4
6
12
 
7
13
  - [d8e13](https://github.com/LeFnord/grape-starter/commit/1f5faef958799704163b7db25db07c569cad8e13) -
@@ -83,7 +83,7 @@ module Starter
83
83
  file_list.map { |x| send("#{x}_name") }.each do |file_to_remove|
84
84
  begin
85
85
  FileUtils.rm file_to_remove
86
- rescue => error
86
+ rescue StandardError => error
87
87
  $stdout.puts error.to_s
88
88
  end
89
89
  end
@@ -26,6 +26,35 @@ module Starter
26
26
  Starter::Config.save(dest: dest, content: { orm: orm.downcase })
27
27
  end
28
28
 
29
+ def config
30
+ <<-FILE.strip_heredoc
31
+ # ActiveRecord Database Configuration
32
+ development:
33
+ adapter: 'sqlite3'
34
+ host: localhost
35
+ port: 27017
36
+ database: "db/development.sqlite3"
37
+ username:
38
+ password:
39
+
40
+ test:
41
+ adapter: 'sqlite3'
42
+ host: localhost
43
+ port: 27017
44
+ database: "db/test.sqlite3"
45
+ username:
46
+ password:
47
+
48
+ production:
49
+ adapter: 'sqlite3'
50
+ host: localhost
51
+ port: 27017
52
+ database: "db/production.sqlite3"
53
+ username:
54
+ password:
55
+ FILE
56
+ end
57
+
29
58
  private
30
59
 
31
60
  def build_initializer(dest)
@@ -21,7 +21,7 @@ module Starter
21
21
  ActiveRecord::Base.establish_connection db_conf[env]
22
22
  logger = if %w[development test].include? env
23
23
  log_dir = File.join(Dir.getwd, 'log')
24
- log_file = File.join(log_dir, 'db.log'))
24
+ log_file = File.join(log_dir, 'db.log')
25
25
  FileUtils.mkdir(log_dir) unless Dir.exist?(log_dir)
26
26
  Logger.new(File.open(log_file, 'a'))
27
27
  else
@@ -46,7 +46,7 @@ module Starter
46
46
  end
47
47
 
48
48
  return response
49
- rescue Exception
49
+ rescue StandardError
50
50
  ActiveRecord::Base.clear_active_connections!
51
51
  raise
52
52
  end
@@ -56,35 +56,6 @@ module Starter
56
56
  FILE
57
57
  end
58
58
 
59
- def config # TODO: Dry (Same config for Sequel)
60
- <<-FILE.strip_heredoc
61
- # ActiveRecord Database Configuration
62
- development:
63
- adapter: 'sqlite3'
64
- host: localhost
65
- port: 27017
66
- database: "db/development.sqlite3"
67
- username:
68
- password:
69
-
70
- test:
71
- adapter: 'sqlite3'
72
- host: localhost
73
- port: 27017
74
- database: "db/test.sqlite3"
75
- username:
76
- password:
77
-
78
- production:
79
- adapter: 'sqlite3'
80
- host: localhost
81
- port: 27017
82
- database: "db/production.sqlite3"
83
- username:
84
- password:
85
- FILE
86
- end
87
-
88
59
  def rakefile
89
60
  <<-FILE.strip_heredoc
90
61
  # ActiveRecord DB tasks
@@ -37,35 +37,6 @@ module Starter
37
37
  FILE
38
38
  end
39
39
 
40
- def config
41
- <<-FILE.strip_heredoc
42
- # Sequel Database Configuration
43
- development:
44
- adapter: 'sqlite'
45
- host: localhost
46
- port: 27017
47
- database: "db/development.sqlite3"
48
- username:
49
- password:
50
-
51
- test:
52
- adapter: 'sqlite'
53
- host: localhost
54
- port: 27017
55
- database: "db/test.sqlite3"
56
- username:
57
- password:
58
-
59
- production:
60
- adapter: 'sqlite'
61
- host: localhost
62
- port: 27017
63
- database: "db/production.sqlite3"
64
- username:
65
- password:
66
- FILE
67
- end
68
-
69
40
  def rakefile
70
41
  <<-FILE.strip_heredoc
71
42
  # Sequel migration tasks
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Starter
4
- VERSION = '0.8.4'
4
+ VERSION = '0.8.5'
5
5
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ENV['RACK_ENV'] ||= 'test'
3
+ ENV['RACK_ENV'] = 'test'
4
4
 
5
5
  require 'rack/test'
6
6
  require File.expand_path('../../config/environment', __FILE__)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - LeFnord
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-07 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.6.12
153
+ rubygems_version: 2.6.13
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Create a Grape Rack skeleton