sandro-homeward 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +21 -0
- data/VERSION +1 -1
- data/homeward.gemspec +6 -11
- data/lib/homeward.rb +0 -29
- data/rails_generators/homeward/homeward_generator.rb +1 -0
- data/rails_generators/homeward/templates/application.html.haml +1 -2
- data/rails_generators/homeward/templates/application_settings.rb +37 -9
- data/rails_generators/homeward/templates/current_page_normalizer.rb +2 -1
- data/rails_generators/homeward/templates/homeward_helper.rb +2 -2
- data/rails_generators/homeward/templates/settings.yml +2 -0
- data/rails_generators/homeward/templates/uri_ext.rb +8 -0
- metadata +5 -10
- data/Manifest.txt +0 -17
- data/init.rb +0 -2
- data/rails/init.rb +0 -2
- data/spec/homeward_spec.rb +0 -7
- data/spec/spec_helper.rb +0 -16
data/History.txt
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
== 0.2.2 / 2009-09-05
|
2
|
+
* enhancements
|
3
|
+
- APP_SETTINGS changed to ApplicationSettings module
|
4
|
+
module contains helpful methods for generating urls with appropriate ports
|
5
|
+
ApplicationSettings.host
|
6
|
+
ApplicationSettings.host_port
|
7
|
+
ApplicationSettings.host_with_port
|
8
|
+
|
9
|
+
- Removed init.rb and rails/init.rb
|
10
|
+
homeward is a bunch of generators not a rails plugin
|
11
|
+
|
12
|
+
- Renamed render_flashes to render_flash
|
13
|
+
Flash divs follow the convention of <div id="flash" class="notice">
|
14
|
+
|
15
|
+
- Removed the javascript variable AUTH_TOKEN
|
16
|
+
There are better ways to utilize the authenticity_token like: $('form').serialize();
|
17
|
+
|
18
|
+
== 0.2.1 / 2009-06-13
|
19
|
+
* bug fixes
|
20
|
+
- Properly namespace homeward.rake task
|
21
|
+
|
1
22
|
== 0.2.0 / 2009-06-01
|
2
23
|
* 2 major enhancements
|
3
24
|
- Removed many methods in the Homeward namespace - Homeward is now simply a generator.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/homeward.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{homeward}
|
5
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
11
|
s.authors = ["Sandro Turriate"]
|
9
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-09-05}
|
10
13
|
s.description = %q{A collection of utilities I like to use on all new rails projects}
|
11
14
|
s.email = %q{sandro.turriate@gmail.com}
|
12
15
|
s.extra_rdoc_files = [
|
@@ -15,15 +18,12 @@ Gem::Specification.new do |s|
|
|
15
18
|
s.files = [
|
16
19
|
".gitignore",
|
17
20
|
"History.txt",
|
18
|
-
"Manifest.txt",
|
19
21
|
"README.rdoc",
|
20
22
|
"Rakefile",
|
21
23
|
"VERSION",
|
22
24
|
"homeward.gemspec",
|
23
|
-
"init.rb",
|
24
25
|
"lib/homeward.rb",
|
25
26
|
"lib/homeward/tasks/homeward.rake",
|
26
|
-
"rails/init.rb",
|
27
27
|
"rails_generators/homeward/USAGE",
|
28
28
|
"rails_generators/homeward/homeward_generator.rb",
|
29
29
|
"rails_generators/homeward/templates/application.html.haml",
|
@@ -32,8 +32,7 @@ Gem::Specification.new do |s|
|
|
32
32
|
"rails_generators/homeward/templates/homeward.rake",
|
33
33
|
"rails_generators/homeward/templates/homeward_helper.rb",
|
34
34
|
"rails_generators/homeward/templates/settings.yml",
|
35
|
-
"
|
36
|
-
"spec/spec_helper.rb"
|
35
|
+
"rails_generators/homeward/templates/uri_ext.rb"
|
37
36
|
]
|
38
37
|
s.has_rdoc = true
|
39
38
|
s.homepage = %q{http://github.com/sandro/homeward}
|
@@ -41,10 +40,6 @@ Gem::Specification.new do |s|
|
|
41
40
|
s.require_paths = ["lib"]
|
42
41
|
s.rubygems_version = %q{1.3.1}
|
43
42
|
s.summary = %q{Install blueprint, jrails, application layout, etc.}
|
44
|
-
s.test_files = [
|
45
|
-
"spec/homeward_spec.rb",
|
46
|
-
"spec/spec_helper.rb"
|
47
|
-
]
|
48
43
|
|
49
44
|
if s.respond_to? :specification_version then
|
50
45
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/lib/homeward.rb
CHANGED
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
module Homeward
|
4
|
-
VERSION = '0.2.0'
|
5
|
-
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
6
|
-
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
7
|
-
|
8
|
-
def self.version
|
9
|
-
VERSION
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.libpath( *args )
|
13
|
-
args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.path( *args )
|
17
|
-
args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.require_all_libs_relative_to(fname, dir = nil)
|
21
|
-
dir ||= ::File.basename(fname, '.*')
|
22
|
-
search_me = ::File.expand_path(
|
23
|
-
::File.join(::File.dirname(fname), dir, '**', '*.rb'))
|
24
|
-
|
25
|
-
Dir.glob(search_me).sort.each {|rb| require rb}
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
Homeward.require_all_libs_relative_to(__FILE__)
|
@@ -15,6 +15,7 @@ class HomewardGenerator < Rails::Generator::Base
|
|
15
15
|
|
16
16
|
m.with_options :collision => :ask do |mc|
|
17
17
|
mc.file 'homeward.rake', 'lib/tasks/homeward.rake'
|
18
|
+
mc.file 'uri_ext.rb', 'lib/uri_ext.rb'
|
18
19
|
|
19
20
|
mc.template 'application.html.haml', 'app/views/layouts/application.html.haml'
|
20
21
|
|
@@ -5,7 +5,6 @@
|
|
5
5
|
%title= h(@title || "<%= project_name %>")
|
6
6
|
= blueprint_stylesheets
|
7
7
|
= stylesheet_link_tag 'application', :media => 'screen, projection'
|
8
|
-
= javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.to_json};" if protect_against_forgery?
|
9
8
|
= javascript_include_tag %w(jquery jquery-ui jrails)
|
10
9
|
= javascript_include_tag 'application'
|
11
10
|
= yield :head
|
@@ -15,6 +14,6 @@
|
|
15
14
|
%h1
|
16
15
|
= link_to "<%= project_name %>", root_url
|
17
16
|
|
18
|
-
=
|
17
|
+
= render_flash
|
19
18
|
= yield
|
20
19
|
|
@@ -1,13 +1,41 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
require 'ostruct'
|
2
|
+
require 'uri_ext.rb'
|
3
|
+
|
4
|
+
module ApplicationSettings
|
5
|
+
extend self
|
6
|
+
|
7
|
+
attr_writer :settings
|
8
|
+
private :settings=
|
9
|
+
|
10
|
+
def build_from_yaml(path)
|
11
|
+
if File.exist?(path) && config = YAML.load_file(path)
|
12
|
+
if settings = config[Rails.env]
|
13
|
+
self.settings = OpenStruct.new settings
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|
17
|
+
|
18
|
+
def do_not_reply
|
19
|
+
"do_not_reply@#{settings.host}.com"
|
20
|
+
end
|
21
|
+
|
22
|
+
def host_uri
|
23
|
+
@host_uri ||= URI::HTTP.build(:host => settings.host, :port => settings.host_port)
|
24
|
+
end
|
25
|
+
|
26
|
+
def host_with_port
|
27
|
+
host_uri.host_with_port
|
28
|
+
end
|
29
|
+
|
30
|
+
def method_missing(name)
|
31
|
+
settings.send(name) rescue nil
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def settings
|
37
|
+
@settings ||= OpenStruct.new
|
38
|
+
end
|
11
39
|
end
|
12
40
|
|
13
|
-
|
41
|
+
ApplicationSettings.build_from_yaml(File.join(RAILS_ROOT, %w(config settings.yml)))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sandro-homeward
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Turriate
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-05 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -24,15 +24,12 @@ extra_rdoc_files:
|
|
24
24
|
files:
|
25
25
|
- .gitignore
|
26
26
|
- History.txt
|
27
|
-
- Manifest.txt
|
28
27
|
- README.rdoc
|
29
28
|
- Rakefile
|
30
29
|
- VERSION
|
31
30
|
- homeward.gemspec
|
32
|
-
- init.rb
|
33
31
|
- lib/homeward.rb
|
34
32
|
- lib/homeward/tasks/homeward.rake
|
35
|
-
- rails/init.rb
|
36
33
|
- rails_generators/homeward/USAGE
|
37
34
|
- rails_generators/homeward/homeward_generator.rb
|
38
35
|
- rails_generators/homeward/templates/application.html.haml
|
@@ -41,8 +38,7 @@ files:
|
|
41
38
|
- rails_generators/homeward/templates/homeward.rake
|
42
39
|
- rails_generators/homeward/templates/homeward_helper.rb
|
43
40
|
- rails_generators/homeward/templates/settings.yml
|
44
|
-
-
|
45
|
-
- spec/spec_helper.rb
|
41
|
+
- rails_generators/homeward/templates/uri_ext.rb
|
46
42
|
has_rdoc: true
|
47
43
|
homepage: http://github.com/sandro/homeward
|
48
44
|
post_install_message:
|
@@ -69,6 +65,5 @@ rubygems_version: 1.2.0
|
|
69
65
|
signing_key:
|
70
66
|
specification_version: 2
|
71
67
|
summary: Install blueprint, jrails, application layout, etc.
|
72
|
-
test_files:
|
73
|
-
|
74
|
-
- spec/spec_helper.rb
|
68
|
+
test_files: []
|
69
|
+
|
data/Manifest.txt
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.rdoc
|
4
|
-
Rakefile
|
5
|
-
generators/homeward/USAGE
|
6
|
-
generators/homeward/homeward_generator.rb
|
7
|
-
generators/homeward/templates/application.html.haml
|
8
|
-
generators/homeward/templates/constants.rb
|
9
|
-
generators/homeward/templates/homeward.rake
|
10
|
-
generators/homeward/templates/settings.yml
|
11
|
-
init.rb
|
12
|
-
lib/homeward.rb
|
13
|
-
lib/homeward/controller_helpers.rb
|
14
|
-
lib/homeward/view_helpers.rb
|
15
|
-
rails/init.rb
|
16
|
-
spec/homeward_spec.rb
|
17
|
-
spec/spec_helper.rb
|
data/init.rb
DELETED
data/rails/init.rb
DELETED
data/spec/homeward_spec.rb
DELETED
data/spec/spec_helper.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
require File.expand_path(
|
3
|
-
File.join(File.dirname(__FILE__), %w[.. lib homeward]))
|
4
|
-
|
5
|
-
Spec::Runner.configure do |config|
|
6
|
-
# == Mock Framework
|
7
|
-
#
|
8
|
-
# RSpec uses it's own mocking framework by default. If you prefer to
|
9
|
-
# use mocha, flexmock or RR, uncomment the appropriate line:
|
10
|
-
#
|
11
|
-
# config.mock_with :mocha
|
12
|
-
# config.mock_with :flexmock
|
13
|
-
# config.mock_with :rr
|
14
|
-
end
|
15
|
-
|
16
|
-
# EOF
|