hightail 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- Hightail bootstraps a pretty looking Rails app in a jiff.
1
+ # Hightail
2
+
3
+ Bootstraps a pretty looking Rails app in a jiff.
2
4
 
3
5
 
4
6
  ## Installation
@@ -19,9 +19,13 @@ module Hightail
19
19
  template 'README.md'
20
20
  end
21
21
 
22
+ def bundler
23
+ directory 'bundle', '.bundle'
24
+ end
25
+
22
26
  def rspec
23
27
  copy_file 'rspec', '.rspec'
24
- template 'spec/spec_helper.rb'
28
+ directory 'spec'
25
29
  empty_directory_with_gitkeep 'spec/support'
26
30
  end
27
31
 
@@ -41,8 +41,9 @@ module Hightail
41
41
  end
42
42
 
43
43
  def hightail_customization
44
- build :rvm unless options[:skip_rvm]
44
+ build :bundler
45
45
  build :rspec unless options[:skip_rspec]
46
+ build :rvm unless options[:skip_rvm]
46
47
  build :remove_public_index
47
48
  build :remove_rails_logo
48
49
  end
@@ -1,3 +1,3 @@
1
1
  module Hightail
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -1,14 +1,11 @@
1
1
  @import 'common'
2
2
 
3
3
  form
4
- section > &
5
- +rounded
6
- background: #FFF
7
- color: #000
8
- padding: $spacer
4
+ margin: $spacer 0
9
5
 
10
6
  input,
11
- select
7
+ select,
8
+ textarea
12
9
  +rounded(0.25em)
13
10
  background: #EEE
14
11
  border: 0.125em solid #999
@@ -61,10 +58,14 @@ form
61
58
  color: #666
62
59
  font-style: italic
63
60
 
64
- &.radio input
65
- height: $line-height
66
- float: left
67
- margin-right: 0.5em
61
+ &.checkbox,
62
+ &.radio
63
+ white-space: nowrap
64
+
65
+ input
66
+ height: $line-height
67
+ float: left
68
+ margin-right: 0.5em
68
69
 
69
70
  .instructions
70
71
  color: $gray
@@ -108,5 +109,7 @@ form
108
109
  label
109
110
  :color $error
110
111
 
111
- input
112
+ input,
113
+ select,
114
+ textarea
112
115
  border-color: $error
@@ -39,6 +39,23 @@ body
39
39
  text-decoration: none
40
40
  text-transform: uppercase
41
41
 
42
+ & > dl
43
+ margin: $spacer 0
44
+ border-top: 2px dotted $light-gray
45
+
46
+ dd,
47
+ dt
48
+ line-height: $line-height
49
+ border-bottom: 2px dotted $light-gray
50
+
51
+ dt
52
+ float: left
53
+ width: 10em
54
+ font-size: 0.75em
55
+ font-weight: bold
56
+ line-height: $line-height / 0.75
57
+ text-transform: uppercase
58
+
42
59
  & > footer
43
60
  border-top: 1px solid $gray
44
61
  color: $gray
@@ -0,0 +1,3 @@
1
+ class ApplicationModel < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_BIN: bin
@@ -33,8 +33,13 @@ module <%= app_const_base %>
33
33
  <% end -%>
34
34
 
35
35
  # Generators
36
- config.generators.test_framework :rspec, view_specs: false
37
- config.generators.template_engine :haml
36
+ config.generators do |generators|
37
+ generators.orm :active_record, parent: 'ApplicationModel'
38
+ generators.test_framework :rspec, view_specs: false
39
+ generators.template_engine :haml
40
+ end
41
+
42
+ # Sass
38
43
  config.sass.preferred_syntax = :sass
39
44
  end
40
45
  end
@@ -1,3 +1,7 @@
1
- <%= app_const %>.configure do
2
- config.action_view.default_form_builder <%= app_const_base %>::FormBuilder
3
- end
1
+ # This should work, but it doesn't because of http://git.io/7sQi8g:
2
+ #<%= app_const %>.configure do
3
+ # config.action_view.default_form_builder <%= app_const_base %>::FormBuilder
4
+ #end
5
+
6
+ # So let's do this instead until it's fixed:
7
+ ActionView::Base.default_form_builder = <%= app_const_base %>::FormBuilder
@@ -79,7 +79,7 @@ module <%= app_const_base %>
79
79
  send(type, method, options)
80
80
  end
81
81
 
82
- label = label != false ? label(method) : nil
82
+ label = options[:label] != false ? label(method) : nil
83
83
  markup = [label, input].compact
84
84
  markup.reverse! if [:check_box, :radio_button].include?(type)
85
85
 
@@ -92,6 +92,8 @@ module <%= app_const_base %>
92
92
  end
93
93
  end
94
94
 
95
+ alias_method :hidden, :hidden_field
96
+
95
97
  def text(method, options={}, &block)
96
98
  input(method, options.merge(:type => :text_field), &block)
97
99
  end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe <%= class_name %> do
4
+ context 'indexes' do
5
+ end
6
+
7
+ context 'associations' do
8
+ end
9
+
10
+ context 'validations' do
11
+ end
12
+ end
data/templates/rvmrc CHANGED
@@ -4,7 +4,7 @@
4
4
  # development environment upon cd'ing into the directory
5
5
 
6
6
  # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
7
- environment_id="ruby-1.9.2-p290@<%= app_name %>"
7
+ environment_id="ruby-1.9.3@<%= app_name %>"
8
8
 
9
9
  # Uncomment following line if you want options to be set only for given project.
10
10
  #PROJECT_JRUBY_OPTS=( --1.9 )
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ describe ApplicationModel do
4
+ subject { described_class }
5
+
6
+ its(:ancestors) { should include(ActiveRecord::Base) }
7
+ its(:abstract_class) { should be_true }
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hightail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-02 00:00:00.000000000Z
12
+ date: 2012-03-13 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70264621190400 !ruby/object:Gem::Requirement
16
+ requirement: &70364949383060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70264621190400
24
+ version_requirements: *70364949383060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70264621189900 !ruby/object:Gem::Requirement
27
+ requirement: &70364949382560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '1.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70264621189900
35
+ version_requirements: *70364949382560
36
36
  description:
37
37
  email:
38
38
  - tyler@tylerhunt.com
@@ -60,7 +60,9 @@ files:
60
60
  - templates/app_overrides/assets/stylesheets/form_builder.css.sass
61
61
  - templates/app_overrides/assets/stylesheets/layout.css.sass
62
62
  - templates/app_overrides/assets/stylesheets/reset.css.sass
63
+ - templates/app_overrides/models/application_model.rb
63
64
  - templates/app_overrides/views/layouts/application.html.haml.tt
65
+ - templates/bundle/config
64
66
  - templates/config.ru
65
67
  - templates/config/application.rb
66
68
  - templates/config/databases/postgresql.yml
@@ -91,9 +93,11 @@ files:
91
93
  - templates/lib/generators/haml/scaffold/templates/index.html.haml
92
94
  - templates/lib/generators/haml/scaffold/templates/new.html.haml
93
95
  - templates/lib/generators/haml/scaffold/templates/show.html.haml
96
+ - templates/lib/templates/rspec/model/model_spec.rb
94
97
  - templates/rspec
95
98
  - templates/rvmrc
96
- - templates/spec/spec_helper.rb
99
+ - templates/spec/models/application_model_spec.rb
100
+ - templates/spec/spec_helper.rb.tt
97
101
  homepage:
98
102
  licenses: []
99
103
  post_install_message: