startmeup 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fd4308effa90a1fcaaaeed6a466948d166ebfe9
4
- data.tar.gz: 5c890b25988781507acfb24d43aafaaa3b100153
3
+ metadata.gz: 34c9cac51edd513a1e8fdd93aec61898946f2adc
4
+ data.tar.gz: 56a1e06cb8ecbb197305c7a6d992c031ee86bf92
5
5
  SHA512:
6
- metadata.gz: 99e3a90121d17495dd7c695544798850de802b7f0412f2977b9511a41fb92583b41eb6e9457a5c2d5a875f96946424364656eac8e69048683d4db10abaeedc1c
7
- data.tar.gz: 2327938a7c9330a12b6fe48f8aad7b20e1636feba10d8a7c01ea1941c5c88dac17e52e0ef15406f4bec027459efcf4c49d532cf3e769bbba145018742fbfd129
6
+ metadata.gz: 178c570ded389c0d1fa28d45001c5aadea8fc243a0268d54b586fb43477dd87f66fbe31270fc50900ca9122c2e6b60ab5f1d7b44a7f0148ae26d6f5c150c3d4a
7
+ data.tar.gz: 26aa31c9b30b62e78d2daa4519fac27bca238f118781fe3a6dfaf96ea9c2f45bdc567c569c9c5e2ef67577c21959461c60d3097726186e3ba12330f064ab6e08
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- ## Scaffold styles, variables and structure for Bourbon/Neat projects.
1
+ ## Scaffold styles, variables, structure and other bits for Bourbon/Neat projects.
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/startmeup.svg)](http://badge.fury.io/rb/startmeup)
2
4
 
3
5
  StartMeUp is made to work alongside a CSS reset; not replace one. The suggested reset is [Normalize](http://necolas.github.io/normalize.css).
4
6
 
@@ -97,6 +99,9 @@ Helper declarations for a styleguide page (seperate gem to be developed).
97
99
  ### Flash
98
100
  Basic Rails flash styles.
99
101
 
102
+ ### Debug
103
+ Sass and Haml partials for visual debugging will be added to `/stylesheets` and `/views/shared` respectively. The Sass import is initially commented out. The Haml partial needs to be added to the application layout file after the `body` tag.
104
+
100
105
  ## Credits
101
106
 
102
107
  StartMeUp is a wholesale ripoff of Bitters by Thoughtbot. I made it to learn how to make a gem.
@@ -15,3 +15,4 @@
15
15
  @import flash
16
16
  @import panel
17
17
  @import styleguide
18
+ // @import debug // can uncomment if using grid-settings
@@ -0,0 +1,97 @@
1
+ // Colours
2
+ $orange: #EF884B
3
+ $yellow: #FBD560
4
+ $blue: #277FCD
5
+ $white: #fff
6
+ $black: #111
7
+ $green: #6BC15E
8
+ $fuschia: #DA54B7
9
+
10
+ // Media query mixins
11
+ @mixin small()
12
+ +media($small-screen)
13
+ @content
14
+
15
+ @mixin small-medium()
16
+ +media($small-medium-screen)
17
+ @content
18
+
19
+ @mixin medium()
20
+ +media($medium-screen)
21
+ @content
22
+
23
+ @mixin medium-large()
24
+ +media($medium-large-screen)
25
+ @content
26
+
27
+ @mixin large()
28
+ +media($large-screen)
29
+ @content
30
+
31
+ @mixin huge()
32
+ +media($huge-screen)
33
+ @content
34
+
35
+ // Styles
36
+ #debug
37
+ position: fixed
38
+ z-index: 10
39
+ bottom: 0
40
+ right: 0
41
+ width: 100px
42
+ height: 20px
43
+ text-align: center
44
+ font-size: 12px
45
+ line-height: 22px
46
+ color: $white
47
+ background: $orange
48
+ &:after
49
+ content: "Phone"
50
+
51
+ +small()
52
+ color: $black
53
+ background: $yellow
54
+ &:after
55
+ content: "small"
56
+
57
+ +small-medium()
58
+ color: $white
59
+ background: $green
60
+ &:after
61
+ content: "small-medium"
62
+
63
+ +medium()
64
+ color: $white
65
+ background: $blue
66
+ &:after
67
+ content: "medium"
68
+
69
+ +medium-large()
70
+ color: $white
71
+ background: $green
72
+ &:after
73
+ content: "medium-large"
74
+
75
+ +large()
76
+ color: $white
77
+ background: $black
78
+ &:after
79
+ content: "large"
80
+
81
+ +huge()
82
+ color: $white
83
+ background: $orange
84
+ &:after
85
+ content: "huge"
86
+
87
+ #params
88
+ position: fixed
89
+ bottom: 0
90
+ left: 0
91
+ padding: 0 10px
92
+ height: 20px
93
+ text-align: center
94
+ font-size: 12px
95
+ line-height: 22px
96
+ color: $white
97
+ background: shade($orange,20)
@@ -0,0 +1,5 @@
1
+ / add me after the body tag in your application layout
2
+ -if Rails.env.development?
3
+ #debug
4
+ #params
5
+ =params.inspect
@@ -16,7 +16,18 @@ module StartMeUp
16
16
  puts "StartMeUp files already installed, doing nothing."
17
17
  else
18
18
  install_files
19
- puts "StartMeUp files installed to #{install_path}/base"
19
+ print <<-postinstall
20
+ *************************************************
21
+
22
+ STYLES
23
+ StartMeUp files installed to #{install_path}/base
24
+
25
+ DEBUG
26
+ _debug.haml partial added to views/shared
27
+ (add it after the body tag in your application layout)
28
+
29
+ *************************************************
30
+ postinstall
20
31
  end
21
32
  end
22
33
 
@@ -56,9 +67,16 @@ module StartMeUp
56
67
  Pathname.new(options[:path].to_s).join('base')
57
68
  end
58
69
 
70
+ def views_install_path
71
+ pn = Pathname.new(options[:path].to_s).join('base')
72
+ pn.parent.parent.parent + 'views'
73
+ end
74
+
59
75
  def install_files
60
76
  FileUtils.mkdir_p(install_path)
77
+ FileUtils.mkdir_p(views_install_path)
61
78
  FileUtils.cp_r(all_stylesheets, install_path)
79
+ FileUtils.cp_r(all_views, views_install_path)
62
80
  end
63
81
 
64
82
  def remove_startmeup_directory
@@ -69,10 +87,18 @@ module StartMeUp
69
87
  Dir["#{stylesheets_directory}/*"]
70
88
  end
71
89
 
90
+ def all_views
91
+ Dir["#{views_directory}/*"]
92
+ end
93
+
72
94
  def stylesheets_directory
73
95
  File.join(top_level_directory, "app", "assets", "stylesheets")
74
96
  end
75
97
 
98
+ def views_directory
99
+ File.join(top_level_directory, "app", "views")
100
+ end
101
+
76
102
  def top_level_directory
77
103
  File.dirname(File.dirname(File.dirname(__FILE__)))
78
104
  end
@@ -1,3 +1,3 @@
1
1
  module StartMeUp
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,4 @@
1
+ -if Rails.env.development?
2
+ #debug
3
+ #params
4
+ =params.inspect
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'sass'
3
+ require 'haml'
3
4
  require 'bourbon'
4
5
 
5
6
  describe StartMeUp do
@@ -14,4 +15,10 @@ describe StartMeUp do
14
15
 
15
16
  expect(Pathname('/tmp/output.css')).to exist
16
17
  end
18
+
19
+ it 'adds a debug partial' do
20
+ `startmeup install --path spec/fixtures`
21
+
22
+ # expect(Pathname('/tmp/')).to exist
23
+ end
17
24
  end
@@ -30,5 +30,6 @@ design and brand requirements.
30
30
  s.add_dependency 'bourbon', '>= 3.2'
31
31
  s.add_dependency 'neat'
32
32
  s.add_dependency 'sass', '>= 3.2'
33
+ s.add_dependency 'haml'
33
34
  s.add_dependency 'thor'
34
35
  end
@@ -0,0 +1,5 @@
1
+ / add me after the body tag in your application layout
2
+ -if Rails.env.development?
3
+ #debug
4
+ #params
5
+ =params.inspect
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: startmeup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaz Aston
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-06 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.2'
97
+ - !ruby/object:Gem::Dependency
98
+ name: haml
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: thor
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -127,6 +141,7 @@ files:
127
141
  - Rakefile
128
142
  - app/assets/stylesheets/_base.sass
129
143
  - app/assets/stylesheets/_buttons.sass
144
+ - app/assets/stylesheets/_debug.sass
130
145
  - app/assets/stylesheets/_flash.sass
131
146
  - app/assets/stylesheets/_forms.sass
132
147
  - app/assets/stylesheets/_grid-settings.sass
@@ -136,15 +151,18 @@ files:
136
151
  - app/assets/stylesheets/_tables.sass
137
152
  - app/assets/stylesheets/_typography.sass
138
153
  - app/assets/stylesheets/_variables.sass
154
+ - app/views/shared/_debug.haml
139
155
  - bin/startmeup
140
156
  - lib/startmeup.rb
141
157
  - lib/startmeup/generator.rb
142
158
  - lib/startmeup/version.rb
143
159
  - sache.json
160
+ - shared/_debug.haml
144
161
  - spec/fixtures/application.sass
145
162
  - spec/spec_helper.rb
146
163
  - spec/startmeup_spec.rb
147
164
  - startmeup.gemspec
165
+ - views/shared/_debug.haml
148
166
  homepage: http://gaz.is
149
167
  licenses:
150
168
  - MIT