melodiest 0.2.0 → 0.2.1

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: 61a1ca9f0d801c00782ea2292bd6a76e68af04e1
4
- data.tar.gz: 70dc5c6791cb7a7cc97fd6fb4ff0a96e7438d7f9
3
+ metadata.gz: 0b579b11889dfcee9922093cab10b487bf65dc88
4
+ data.tar.gz: 723d68077098c8218a7c75e6df36caa9550e9b9f
5
5
  SHA512:
6
- metadata.gz: b24717b4ecfd760e49e7ee8522ee756ee0aae290f05c528e40c83687df3f3118703aecc175530f7b05aa8f3fcd31984133c659f1b0834f0183139eb69b03aaa7
7
- data.tar.gz: 39816f9ac983ed88f7167daeb73e8791a40ff5d875301b21270561c3692bee43af1b2295ec257e86488857a76d99800196d44636fcf0fcaf57477f03d8b6145d
6
+ metadata.gz: 25f1d75cdd945a882798146c6e10942ce5bf5dba2cafdbc6dab8a84a63a6ba44b9eb524090980a92cea6cf59952743e5e91949232e10de02cdcb58415e5f006f
7
+ data.tar.gz: b9c15805e704306bf1e2566dcdfa65b3f8e935b0dc5b782f85e27ede43f5b2f1ebfd4f212df256574f5a04e2315cf343b44d0f8df6a6eaa0eaa1ebae936a96ea
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'fakefs', '0.6.7', require: 'fakefs/safe'
4
-
5
3
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- melodiest (0.2.0)
4
+ melodiest (0.2.1)
5
5
  sinatra (= 1.4.5)
6
6
  sinatra-contrib (= 1.4.2)
7
7
  thin (= 1.6.3)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Melodiest
2
2
 
3
- Melodiest is [Sinatra](http://www.sinatrarb.com/) configuration boilerplate. The purpose of this gem is because I'm too lazy to write configuration every my Sinatra project.
3
+ Melodiest is [Sinatra](http://www.sinatrarb.com/) application boilerplate. It provides generator and useful modules for developing application.
4
4
 
5
5
  ### Installation
6
6
 
@@ -37,7 +37,7 @@ Because Melodiest is already required Sinatra, you don't have to require 'sinatr
37
37
 
38
38
  require 'melodiest/auth/http'
39
39
 
40
- class App < Melodiest::Application'
40
+ class App < Melodiest::Application
41
41
  configure do
42
42
  # Load up database and such
43
43
  end
@@ -63,12 +63,13 @@ bundle exec rackup
63
63
  ```
64
64
 
65
65
 
66
- ### Configuration
66
+ ### Default Configuration
67
67
 
68
- See [melodiest/config.yml](https://github.com/kuntoaji/melodiest/blob/master/lib/melodiest/config.yml)
68
+ * `Sinatra::Reloader` in development environment only
69
+ * See [melodiest/config.yml](https://github.com/kuntoaji/melodiest/blob/master/lib/melodiest/config.yml)
69
70
 
70
- ### Helpers
71
+ ### Modules
71
72
 
72
- Helper methods
73
+ Available modules from Melodiest
73
74
 
74
75
  * `Melodiest::Auth::Http`
@@ -27,9 +27,10 @@ module Melodiest
27
27
 
28
28
  def generate_bundle_config
29
29
  File.open "#{@destination}/config.ru", "w" do |f|
30
+ f.write("ENV['RACK_ENV'] ||= 'development'\n\n")
30
31
  f.write("require 'rubygems'\n")
31
32
  f.write("require 'bundler'\n\n")
32
- f.write("Bundler.require\n\n")
33
+ f.write("Bundler.require :default, ENV['RACK_ENV'].to_sym\n\n")
33
34
  f.write("require './#{@app_name}'\n")
34
35
  f.write("run #{@app_class_name}\n")
35
36
  end
@@ -1,3 +1,3 @@
1
1
  module Melodiest
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -3,9 +3,9 @@ require_relative 'lib/melodiest/version'
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'melodiest'
5
5
  s.version = Melodiest::VERSION
6
- s.date = '2015-02-01'
7
- s.summary = "Sinatra configuration boilerplate"
8
- s.description = "Sinatra configuration boilerplate"
6
+ s.date = Date.today.to_s
7
+ s.summary = "Sinatra application boilerplate"
8
+ s.description = "Melodiest provides generator and useful modules for your Sinatra application"
9
9
  s.author = 'Kunto Aji Kristianto'
10
10
  s.email = 'kunto.aji.kr@slackware-id.org'
11
11
  s.files = `git ls-files -z`.split("\x0")
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.add_development_dependency 'bundler', '~> 1.7'
17
17
  s.add_development_dependency 'rspec', '3.1.0'
18
18
  s.add_development_dependency 'rack-test', '0.6.3'
19
+ s.add_development_dependency 'fakefs', '0.6.7'
19
20
  s.add_runtime_dependency 'sinatra', '1.4.5'
20
21
  s.add_runtime_dependency 'sinatra-contrib', '1.4.2'
21
22
  s.add_runtime_dependency 'thin', '1.6.3'
@@ -45,9 +45,10 @@ describe Melodiest::Generator do
45
45
  file_content = File.read(bundle_config)
46
46
 
47
47
  expect(File.exists?(bundle_config)).to be_truthy
48
+ expect(file_content).to include "ENV['RACK_ENV'] ||= 'development'"
48
49
  expect(file_content).to include "require 'rubygems'"
49
50
  expect(file_content).to include "require 'bundler'"
50
- expect(file_content).to include "Bundler.require"
51
+ expect(file_content).to include "Bundler.require :default, ENV['RACK_ENV'].to_sym"
51
52
  expect(file_content).to include "require './my_app'"
52
53
  expect(file_content).to include "run MyApp"
53
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: melodiest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kunto Aji Kristianto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-01 00:00:00.000000000 Z
11
+ date: 2015-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.6.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: fakefs
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.6.7
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.6.7
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: sinatra
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +108,7 @@ dependencies:
94
108
  - - '='
95
109
  - !ruby/object:Gem::Version
96
110
  version: 1.6.3
97
- description: Sinatra configuration boilerplate
111
+ description: Melodiest provides generator and useful modules for your Sinatra application
98
112
  email: kunto.aji.kr@slackware-id.org
99
113
  executables:
100
114
  - melodiest
@@ -145,5 +159,5 @@ rubyforge_project:
145
159
  rubygems_version: 2.4.5
146
160
  signing_key:
147
161
  specification_version: 4
148
- summary: Sinatra configuration boilerplate
162
+ summary: Sinatra application boilerplate
149
163
  test_files: []