ruby-app 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +2 -3
- data/bin/ruby-app +3 -1
- data/generator/.gitignore +2 -2
- data/generator/Gemfile +4 -2
- data/generator/config/boot.rb +6 -2
- data/generator/spec/spec_helper.rb +15 -4
- data/lib/ruby-app/boot.rb +3 -1
- data/lib/ruby-app/common_config.rb +3 -1
- data/lib/ruby-app/tasks/rspec.rake +1 -1
- data/lib/ruby-app/version.rb +2 -2
- data/spec/app_spec.rb +4 -0
- data/spec/test_app/lib/application.rb +2 -0
- metadata +2 -2
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -4,9 +4,8 @@ RubyApp
|
|
4
4
|
Little ruby application template. For creates light ruby apps (daemons, EventMachine-apps, ...).
|
5
5
|
Supports bundler, environments, rails dirs tree.
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
```
|
7
|
+
$ gem install ruby-app
|
8
|
+
|
10
9
|
|
11
10
|
$ ruby-app new_app
|
12
11
|
$ cd new_app && bundle
|
data/bin/ruby-app
CHANGED
data/generator/.gitignore
CHANGED
data/generator/Gemfile
CHANGED
data/generator/config/boot.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
require 'rubygems'
|
2
|
+
|
3
|
+
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
|
2
4
|
require 'bundler/setup'
|
3
5
|
|
4
6
|
class Application
|
5
|
-
|
6
|
-
|
7
|
+
class << self
|
8
|
+
def root
|
9
|
+
@root ||= File.join(File.dirname(__FILE__), %w(..))
|
10
|
+
end
|
7
11
|
end
|
8
12
|
end
|
9
13
|
|
@@ -1,6 +1,17 @@
|
|
1
|
-
|
2
|
-
require "
|
1
|
+
ENV["APP_ENV"] = 'test'
|
2
|
+
require File.expand_path("../../config/environment", __FILE__)
|
3
3
|
|
4
|
-
|
4
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
5
|
+
# in spec/support/ and its subdirectories.
|
6
|
+
Dir[File.join(App.root, %w{spec support ** *.rb})].each {|f| require f}
|
5
7
|
|
6
|
-
|
8
|
+
RSpec.configure do |config|
|
9
|
+
# ## Mock Framework
|
10
|
+
#
|
11
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
12
|
+
#
|
13
|
+
# config.mock_with :mocha
|
14
|
+
# config.mock_with :flexmock
|
15
|
+
# config.mock_with :rr
|
16
|
+
|
17
|
+
end
|
data/lib/ruby-app/boot.rb
CHANGED
@@ -18,7 +18,9 @@ class CommonConfig
|
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
-
def method_missing(name, *params)
|
21
|
+
def method_missing(name, *params, &block)
|
22
|
+
params = block.call if block
|
23
|
+
|
22
24
|
if name.to_s =~ /_address$/i
|
23
25
|
require 'ostruct'
|
24
26
|
@configs[name] = OpenStruct.new(:host => params[0], :port => params[1].to_i)
|
data/lib/ruby-app/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module RubyApp
|
2
|
-
VERSION = "0.1.
|
3
|
-
end
|
2
|
+
VERSION = "0.1.3"
|
3
|
+
end
|
data/spec/app_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|