gris 0.1.7 → 0.2.0

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: cbd71571b5bfda09a79619eecef2b1e7bf959691
4
- data.tar.gz: cf81127408c56950feb8a08908717706e9fd504f
3
+ metadata.gz: 2378dec765082f5338685289ccf3d21dd31c717a
4
+ data.tar.gz: 6fdaf44e01b1d85daaaeff4a29b347cc982a1219
5
5
  SHA512:
6
- metadata.gz: efd0cfecb9e6c05bc34266586e708239a2e595b29f121f98a7989e34128331b433f8bd97c51a452f4bd820d3a3c6703d07ca9f3196fd6715807065cbbb0bbc18
7
- data.tar.gz: e658cb42d8548d4db4abd82b954a4728a6589ac00b7770780e423c3000a7c30e9cf081dfdffb815a935f43b6701abfaef0ba7b324f0b6a370f52be1c8c4841da
6
+ metadata.gz: 40fbf86e8c95817a85735229c9c5460e57a1f18b18d729948228f6d740349edb922c1c7ae7ff1fe3ecb10f6473acd88a730edf83c4d00d91768415b84de7fb6a
7
+ data.tar.gz: ce324d4d11f5d0bf09a509426bf8472f251b672d32973325d02eaa9403d3de6ac434adf3acb4a47ffdd12972bac62acb9b721b288adc4839fd63a597510b48ff
data/.rubocop_todo.yml CHANGED
@@ -1,12 +1,13 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-03-24 19:01:58 -0400 using RuboCop version 0.29.1.
2
+ # on 2015-05-19 11:04:31 -0400 using RuboCop version 0.31.0.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
6
6
  # versions of RuboCop, may require this file to be generated again.
7
7
 
8
8
  # Offense count: 1
9
- # Configuration parameters: AlignWith, SupportedStyles.
9
+ # Cop supports --auto-correct.
10
+ # Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
10
11
  Lint/EndAlignment:
11
12
  Enabled: false
12
13
 
@@ -38,7 +39,12 @@ Metrics/MethodLength:
38
39
  Style/CaseIndentation:
39
40
  Enabled: false
40
41
 
41
- # Offense count: 22
42
+ # Offense count: 1
43
+ # Cop supports --auto-correct.
44
+ Style/ClosingParenthesisIndentation:
45
+ Enabled: false
46
+
47
+ # Offense count: 24
42
48
  Style/Documentation:
43
49
  Enabled: false
44
50
 
@@ -51,13 +57,14 @@ Style/DoubleNegation:
51
57
  Style/PredicateName:
52
58
  Enabled: false
53
59
 
54
- # Offense count: 3
55
- # Configuration parameters: MaxSlashes.
60
+ # Offense count: 1
61
+ # Cop supports --auto-correct.
62
+ # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
56
63
  Style/RegexpLiteral:
57
64
  Enabled: false
58
65
 
59
- # Offense count: 2
66
+ # Offense count: 1
60
67
  # Cop supports --auto-correct.
61
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
62
- Style/TrivialAccessors:
68
+ # Configuration parameters: MultiSpaceAllowedForOperators.
69
+ Style/SpaceAroundOperators:
63
70
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.1.5
1
+ ruby-2.2.2
data/Gemfile CHANGED
@@ -9,5 +9,5 @@ group :development do
9
9
  gem 'guard-rubocop'
10
10
  gem 'rake', '~> 10.0'
11
11
  gem 'fakefs', '~> 0.4'
12
- gem 'fasterer', '~> 0.1.8'
12
+ gem 'fasterer', '~> 0.1'
13
13
  end
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gris (0.1.7)
4
+ gris (0.2.0)
5
5
  activesupport (~> 4.2, >= 4.2.0)
6
6
  chronic (~> 0.10.0)
7
- dotenv (~> 1.0.2, >= 1.0.2)
7
+ dotenv (~> 2.0, >= 2.0)
8
8
  git (~> 1.2, >= 1.2.8)
9
9
  grape (~> 0.11.0, >= 0.11.0)
10
10
  grape-roar (~> 0.3.0, >= 0.3.0)
11
11
  grape-swagger (~> 0.10.0)
12
12
  hashie-forbidden_attributes (~> 0.1.0)
13
- logging
13
+ logging (~> 2.0)
14
14
  racksh (~> 1.0)
15
15
  rake (~> 10.4, >= 10.4.2)
16
16
  roar (~> 1.0.1)
@@ -44,7 +44,7 @@ GEM
44
44
  ice_nine (~> 0.11.0)
45
45
  thread_safe (~> 0.3, >= 0.3.1)
46
46
  builder (3.2.2)
47
- byebug (4.0.3)
47
+ byebug (5.0.0)
48
48
  columnize (= 0.9.0)
49
49
  celluloid (0.16.0)
50
50
  timers (~> 4.0.0)
@@ -52,15 +52,15 @@ GEM
52
52
  coderay (1.1.0)
53
53
  coercible (1.0.0)
54
54
  descendants_tracker (~> 0.0.1)
55
- colorize (0.7.5)
55
+ colorize (0.7.7)
56
56
  columnize (0.9.0)
57
57
  descendants_tracker (0.0.4)
58
58
  thread_safe (~> 0.3, >= 0.3.1)
59
59
  diff-lcs (1.2.5)
60
- dotenv (1.0.2)
60
+ dotenv (2.0.1)
61
61
  equalizer (0.0.11)
62
62
  fakefs (0.6.7)
63
- fasterer (0.1.8)
63
+ fasterer (0.1.9)
64
64
  colorize (~> 0.7)
65
65
  ruby_parser (~> 3.6)
66
66
  ffi (1.9.8)
@@ -102,25 +102,25 @@ GEM
102
102
  guard-rubocop (1.2.0)
103
103
  guard (~> 2.0)
104
104
  rubocop (~> 0.20)
105
- hashie (3.4.0)
105
+ hashie (3.4.1)
106
106
  hashie-forbidden_attributes (0.1.1)
107
107
  hashie (>= 3.0)
108
108
  hitimes (1.2.2)
109
109
  i18n (0.7.0)
110
110
  ice_nine (0.11.1)
111
111
  json (1.8.2)
112
- listen (2.9.0)
113
- celluloid (>= 0.15.2)
112
+ listen (2.10.0)
113
+ celluloid (~> 0.16.0)
114
114
  rb-fsevent (>= 0.9.3)
115
115
  rb-inotify (>= 0.9)
116
116
  little-plugger (1.1.3)
117
- logging (1.8.2)
118
- little-plugger (>= 1.1.3)
119
- multi_json (>= 1.8.4)
117
+ logging (2.0.0)
118
+ little-plugger (~> 1.1)
119
+ multi_json (~> 1.10)
120
120
  lumberjack (1.0.9)
121
121
  method_source (0.8.2)
122
122
  mini_portile (0.6.2)
123
- minitest (5.5.1)
123
+ minitest (5.6.1)
124
124
  multi_json (1.11.0)
125
125
  multi_xml (0.5.5)
126
126
  nenv (0.2.0)
@@ -129,14 +129,14 @@ GEM
129
129
  notiffany (0.0.6)
130
130
  nenv (~> 0.1)
131
131
  shellany (~> 0.0)
132
- parser (2.2.0.3)
132
+ parser (2.2.2.3)
133
133
  ast (>= 1.1, < 3.0)
134
- powerpack (0.1.0)
134
+ powerpack (0.1.1)
135
135
  pry (0.10.1)
136
136
  coderay (~> 1.1.0)
137
137
  method_source (~> 0.8.1)
138
138
  slop (~> 3.4)
139
- rack (1.6.0)
139
+ rack (1.6.1)
140
140
  rack-accept (0.4.5)
141
141
  rack (>= 0.4)
142
142
  rack-mount (0.8.3)
@@ -151,7 +151,7 @@ GEM
151
151
  rb-fsevent (0.9.4)
152
152
  rb-inotify (0.9.5)
153
153
  ffi (>= 0.5.0)
154
- representable (2.1.5)
154
+ representable (2.2.0)
155
155
  multi_json
156
156
  nokogiri
157
157
  uber (~> 0.0.7)
@@ -161,25 +161,25 @@ GEM
161
161
  rspec-core (~> 3.2.0)
162
162
  rspec-expectations (~> 3.2.0)
163
163
  rspec-mocks (~> 3.2.0)
164
- rspec-core (3.2.2)
164
+ rspec-core (3.2.3)
165
165
  rspec-support (~> 3.2.0)
166
- rspec-expectations (3.2.0)
166
+ rspec-expectations (3.2.1)
167
167
  diff-lcs (>= 1.2.0, < 2.0)
168
168
  rspec-support (~> 3.2.0)
169
169
  rspec-mocks (3.2.1)
170
170
  diff-lcs (>= 1.2.0, < 2.0)
171
171
  rspec-support (~> 3.2.0)
172
172
  rspec-support (3.2.2)
173
- rubocop (0.29.1)
173
+ rubocop (0.31.0)
174
174
  astrolabe (~> 1.3)
175
- parser (>= 2.2.0.1, < 3.0)
175
+ parser (>= 2.2.2.1, < 3.0)
176
176
  powerpack (~> 0.1)
177
177
  rainbow (>= 1.99.1, < 3.0)
178
178
  ruby-progressbar (~> 1.4)
179
- ruby-progressbar (1.7.1)
180
- ruby_parser (3.6.5)
179
+ ruby-progressbar (1.7.5)
180
+ ruby_parser (3.6.6)
181
181
  sexp_processor (~> 4.1)
182
- sexp_processor (4.5.0)
182
+ sexp_processor (4.5.1)
183
183
  shellany (0.0.1)
184
184
  slop (3.6.0)
185
185
  sqlite3 (1.3.10)
@@ -205,7 +205,7 @@ DEPENDENCIES
205
205
  bundler
206
206
  byebug
207
207
  fakefs (~> 0.4)
208
- fasterer (~> 0.1.8)
208
+ fasterer (~> 0.1)
209
209
  gris!
210
210
  guard-rspec
211
211
  guard-rubocop
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Dylan Fareed
1
+ Copyright (c) 2015 Artsy
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,56 @@
1
1
  # Gris
2
2
 
3
- Gris is a framework for building Rack-based hypermedia APIs using Grape, Roar and ActiveRecord.
3
+ [Gris](https://github.com/artsy/gris) is a framework for building opinionated Rack-based hypermedia APIs. Gris aims to provide useful generators, helpers and middleware common to API microservices. Note that Gris is in development and that the ground may shift.
4
4
 
5
- [![Build Status](https://semaphoreci.com/api/v1/projects/37371083-45b6-4c6f-a887-b631ca0fbe5c/381675/badge.png)](https://semaphoreci.com/dylanfareed/gris)
5
+ It makes use of [Grape](https://github.com/intridea/grape), [Roar](https://github.com/apotonick/roar), [RSpec](http://rspec.info/), [Hyperclient](https://github.com/codegram/hyperclient), and [Active Record](https://github.com/rails/rails/tree/master/activerecord) with PostgreSQL among other excellent projects. Gris is derived from/inspired by the stellar and more sophisticated [Napa framework by Bellycard Inc.](https://github.com/bellycard/napa). We stand on the shoulders of tall people.
6
6
 
7
- It is derived from/inspired by the stellar and more sophisticated [Napa framework by Bellycard Inc.](https://github.com/bellycard/napa).
7
+ [![Build Status](https://semaphoreci.com/api/v1/projects/aeb68b19-58b7-4015-885d-e989a3e96ca2/418227/shields_badge.svg)](https://semaphoreci.com/artsy/gris)
8
+ [![Gem Version](https://badge.fury.io/rb/gris.svg)](http://badge.fury.io/rb/gris)
9
+ [![Code Climate](https://codeclimate.com/github/artsy/gris/badges/gpa.svg)](https://codeclimate.com/github/artsy/gris)
10
+ [![Dependency Status](https://gemnasium.com/artsy/gris.svg)](https://gemnasium.com/artsy/gris)
8
11
 
9
- Gris aims to provide generators and middleware common to API microservices. For the moment, however, it is in development and primarily exploratory. Note that the ground may shift.
12
+ ---
13
+
14
+ ### Installation
15
+
16
+ Gris is [available as a gem on rubygems](https://rubygems.org/gems/gris), to install it run:
17
+
18
+ ```
19
+ gem install gris
20
+ ```
21
+
22
+ Otherwise, if your project uses [Bundler](http://bundler.io/), add gris to your Gemfile:
23
+
24
+ ```
25
+ gem 'gris'
26
+ ```
27
+
28
+ And run:
29
+
30
+ ```
31
+ $ bundle install
32
+ ```
33
+
34
+ ---
35
+
36
+ ### Usage
37
+
38
+ ##### CLI & Generators
39
+
40
+ Run the `gris` terminal prompt to see available features:
41
+
42
+ ```
43
+ Commands:
44
+ gris console [environment] # Start the Gris console
45
+ gris generate api <api_name> # Generate a Grape API, Model and Representer
46
+ gris generate migration <migration_name> [field[:type][:index] field[:type][:index]] # Generate a Database Migration
47
+ gris help [COMMAND] # Describe available commands or one specific command
48
+ gris new <app_name> [app_path] # Generates a scaffold for a new Gris service
49
+ gris version # Shows the Gris version number
50
+ ```
51
+
52
+ ---
53
+
54
+ ### The name
55
+
56
+ Gris is named for [Juan Gris](https://www.artsy.net/artist/juan-gris) (but also works in the wine-based word context of Grape and Napa). Cleverness!
data/gris.gemspec CHANGED
@@ -4,10 +4,10 @@ require File.expand_path('../lib/gris/version', __FILE__)
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'gris'
6
6
  s.version = Gris::VERSION
7
- s.summary = 'A simple api microservice generator.'
7
+ s.summary = 'A simple api microservice generator framework.'
8
8
  s.description = 'Gris is a generator for Grape, Roar, Hypermedia, PG API apps.'
9
9
  s.email = 'email@dylanfareed.com'
10
- s.homepage = 'http://github.com/dylanfareed/gris/'
10
+ s.homepage = 'http://github.com/artsy/gris/'
11
11
  s.authors = ['Dylan Fareed']
12
12
  s.licenses = 'MIT-LICENSE'
13
13
 
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
22
22
  s.add_runtime_dependency 'activesupport', '~> 4.2', '>= 4.2.0'
23
23
  s.add_runtime_dependency 'rake', '~> 10.4', '>= 10.4.2'
24
24
  s.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.8'
25
- s.add_runtime_dependency 'dotenv', '~> 1.0.2', '>= 1.0.2'
25
+ s.add_runtime_dependency 'dotenv', '~> 2.0', '>= 2.0'
26
26
 
27
- s.add_dependency 'logging'
27
+ s.add_dependency 'logging', '~> 2.0'
28
28
  s.add_dependency 'grape', '~> 0.11.0', '>= 0.11.0'
29
29
  s.add_dependency 'grape-roar', '~> 0.3.0', '>= 0.3.0'
30
30
 
data/lib/gris/cli.rb CHANGED
@@ -11,14 +11,14 @@ module Gris
11
11
  Generators::ApiGenerator,
12
12
  'api',
13
13
  'api <api_name>',
14
- 'Create a Grape API, Model and Presenter'
14
+ 'Generate a Grape API, Model and Presenter'
15
15
  )
16
16
 
17
17
  register(
18
18
  Generators::MigrationGenerator,
19
19
  'migration',
20
20
  'migration <migration_name> [field[:type][:index] field[:type][:index]]',
21
- 'Create a Database Migration'
21
+ 'Generate a Database Migration'
22
22
  )
23
23
  end
24
24
  end
@@ -58,7 +58,7 @@ module Gris
58
58
  Generators::ScaffoldGenerator,
59
59
  'new',
60
60
  'new <app_name> [app_path]',
61
- 'Creates a scaffold for a new Gris service'
61
+ 'Generates a scaffold for a new Gris service'
62
62
  )
63
63
 
64
64
  desc 'generate api <api_name>', 'Create a Grape API, Model and Representer'
data/lib/gris/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Gris
2
- VERSION = '0.1.7'
2
+ VERSION = '0.2.0'
3
3
 
4
4
  class Version
5
5
  class << self
data/lib/tasks/db.rake CHANGED
@@ -36,7 +36,7 @@ unless defined?(Rails)
36
36
  ActiveRecord::Base.connection.drop_database(db['database'])
37
37
  end
38
38
 
39
- desc 'Create the test database'
39
+ desc 'Recreate the database, load the schema, and initialize with the seed data'
40
40
  task reset: :environment do
41
41
  Rake::Task['db:drop'].invoke
42
42
  Rake::Task['db:create'].invoke
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Fareed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-27 00:00:00.000000000 Z
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -96,34 +96,34 @@ dependencies:
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: 1.0.2
99
+ version: '2.0'
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 1.0.2
102
+ version: '2.0'
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 1.0.2
109
+ version: '2.0'
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 1.0.2
112
+ version: '2.0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: logging
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - ">="
117
+ - - "~>"
118
118
  - !ruby/object:Gem::Version
119
- version: '0'
119
+ version: '2.0'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - ">="
124
+ - - "~>"
125
125
  - !ruby/object:Gem::Version
126
- version: '0'
126
+ version: '2.0'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: grape
129
129
  requirement: !ruby/object:Gem::Requirement
@@ -394,7 +394,7 @@ files:
394
394
  - spec/support/spec_crud_helper.rb
395
395
  - spec/support/spec_generators_helper.rb
396
396
  - spec/version_spec.rb
397
- homepage: http://github.com/dylanfareed/gris/
397
+ homepage: http://github.com/artsy/gris/
398
398
  licenses:
399
399
  - MIT-LICENSE
400
400
  metadata: {}
@@ -414,10 +414,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
414
414
  version: '0'
415
415
  requirements: []
416
416
  rubyforge_project:
417
- rubygems_version: 2.4.3
417
+ rubygems_version: 2.4.5
418
418
  signing_key:
419
419
  specification_version: 4
420
- summary: A simple api microservice generator.
420
+ summary: A simple api microservice generator framework.
421
421
  test_files:
422
422
  - spec/generators/api_generator_spec.rb
423
423
  - spec/generators/migration_generator_spec.rb