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 +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +1 -1
- data/README.md +7 -6
- data/lib/melodiest/generator.rb +2 -1
- data/lib/melodiest/version.rb +1 -1
- data/melodiest.gemspec +4 -3
- data/spec/melodiest/generator_spec.rb +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b579b11889dfcee9922093cab10b487bf65dc88
|
4
|
+
data.tar.gz: 723d68077098c8218a7c75e6df36caa9550e9b9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25f1d75cdd945a882798146c6e10942ce5bf5dba2cafdbc6dab8a84a63a6ba44b9eb524090980a92cea6cf59952743e5e91949232e10de02cdcb58415e5f006f
|
7
|
+
data.tar.gz: b9c15805e704306bf1e2566dcdfa65b3f8e935b0dc5b782f85e27ede43f5b2f1ebfd4f212df256574f5a04e2315cf343b44d0f8df6a6eaa0eaa1ebae936a96ea
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Melodiest
|
2
2
|
|
3
|
-
Melodiest is [Sinatra](http://www.sinatrarb.com/)
|
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
|
-
|
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
|
-
###
|
71
|
+
### Modules
|
71
72
|
|
72
|
-
|
73
|
+
Available modules from Melodiest
|
73
74
|
|
74
75
|
* `Melodiest::Auth::Http`
|
data/lib/melodiest/generator.rb
CHANGED
@@ -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
|
data/lib/melodiest/version.rb
CHANGED
data/melodiest.gemspec
CHANGED
@@ -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 =
|
7
|
-
s.summary = "Sinatra
|
8
|
-
s.description = "Sinatra
|
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.
|
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-
|
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
|
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
|
162
|
+
summary: Sinatra application boilerplate
|
149
163
|
test_files: []
|