dvl-core 0.0.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.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.hound.yml +5 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +2 -0
  6. data/LICENSE.md +20 -0
  7. data/README.md +35 -0
  8. data/circle.yml +7 -0
  9. data/dvl-core.gemspec +30 -0
  10. data/lib/dvl/core.rb +11 -0
  11. data/lib/dvl/core/version.rb +5 -0
  12. data/preview/app.rb +252 -0
  13. data/script/bootstrap +45 -0
  14. data/script/cibuild +3 -0
  15. data/script/preview +3 -0
  16. data/script/release +38 -0
  17. data/spec/dvl_core_spec.rb +30 -0
  18. data/vendor/assets/javascripts/dvl/core.js +4 -0
  19. data/vendor/assets/javascripts/dvl/core/buttons.js +116 -0
  20. data/vendor/assets/javascripts/dvl/core/dropdowns.js +161 -0
  21. data/vendor/assets/javascripts/dvl/core/modals.js +281 -0
  22. data/vendor/assets/javascripts/dvl/core/tooltips.js +478 -0
  23. data/vendor/assets/stylesheets/dvl/core.scss +21 -0
  24. data/vendor/assets/stylesheets/dvl/core/buttons.scss +152 -0
  25. data/vendor/assets/stylesheets/dvl/core/code.scss +31 -0
  26. data/vendor/assets/stylesheets/dvl/core/dropdowns.scss +309 -0
  27. data/vendor/assets/stylesheets/dvl/core/forms.scss +434 -0
  28. data/vendor/assets/stylesheets/dvl/core/grid.scss +87 -0
  29. data/vendor/assets/stylesheets/dvl/core/includes.scss +163 -0
  30. data/vendor/assets/stylesheets/dvl/core/labels.scss +31 -0
  31. data/vendor/assets/stylesheets/dvl/core/legacy.scss +287 -0
  32. data/vendor/assets/stylesheets/dvl/core/links.scss +53 -0
  33. data/vendor/assets/stylesheets/dvl/core/lists.scss +30 -0
  34. data/vendor/assets/stylesheets/dvl/core/media.scss +24 -0
  35. data/vendor/assets/stylesheets/dvl/core/modals.scss +173 -0
  36. data/vendor/assets/stylesheets/dvl/core/pagination.scss +70 -0
  37. data/vendor/assets/stylesheets/dvl/core/print.scss +69 -0
  38. data/vendor/assets/stylesheets/dvl/core/progress.scss +16 -0
  39. data/vendor/assets/stylesheets/dvl/core/resets.scss +92 -0
  40. data/vendor/assets/stylesheets/dvl/core/shame.scss +35 -0
  41. data/vendor/assets/stylesheets/dvl/core/sidebar.scss +101 -0
  42. data/vendor/assets/stylesheets/dvl/core/tables.scss +122 -0
  43. data/vendor/assets/stylesheets/dvl/core/tooltips.scss +87 -0
  44. data/vendor/assets/stylesheets/dvl/core/typography.scss +158 -0
  45. metadata +228 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6734d2e2da51000e63e1820a50c569b96bb078fb
4
+ data.tar.gz: 6bde4acd261cfb8e4cf62d5503ad257b93dfab85
5
+ SHA512:
6
+ metadata.gz: f8ab42297ae8cc697c32aa75775832f470bbe0991ac4b5a99bbeb3381688f884aa4dd5102b13fb5b1550e999f567900ffdf6528f2e786344e1fd4c2e5c5d12ce
7
+ data.tar.gz: e04303847e6a0262fc7803fd3da1338728508365d9330537de0a90e8a7d29c5fbe2cdf120b81d42f013f6896db024398098b06abde08d1008a7dd9e2688b887f
@@ -0,0 +1,4 @@
1
+ .sass-cache
2
+ Gemfile.lock
3
+ *.gem
4
+ screenshots/
@@ -0,0 +1,5 @@
1
+ ruby:
2
+ enabled: true
3
+
4
+ coffee_script:
5
+ enabled: true
@@ -0,0 +1 @@
1
+ 2.1.1
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
@@ -0,0 +1,20 @@
1
+ Copyright 2014 Department of Better Technology
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,35 @@
1
+ dvl-core [![version]](http://rubygems.org/gems/dvl-core) [![build_status]](https://circleci.com/gh/dobtco/dvl-core)
2
+ ====
3
+
4
+ Base styles for the DOBT View Layer.
5
+
6
+ ## Usage
7
+
8
+ ### Gemfile
9
+
10
+ ```
11
+ gem 'dvl-core'
12
+ ```
13
+
14
+ ### assets/javascripts/application.css.scss
15
+
16
+ ```
17
+ @import 'dvl/core';
18
+ ```
19
+
20
+ ## Screenshots
21
+
22
+ ![all_760](http://artifinder.herokuapp.com/gh/dobtco/dvl-core/x/artifacts/0/home/ubuntu/dvl-core/screenshots/all_760.png)
23
+
24
+ ## Development
25
+
26
+ 1. `script/bootstrap`
27
+ 2. `script/preview`
28
+ 3. Open [http://localhost:4567](http://localhost:4567) in your web browser
29
+
30
+ ## License
31
+
32
+ MIT
33
+
34
+ [version]: https://img.shields.io/gem/v/dvl-core.svg
35
+ [build_status]: https://circleci-badges.herokuapp.com/dobtco/dvl-core/87144b68eadac365d9368f5c62e68d3dfcad14bb
@@ -0,0 +1,7 @@
1
+ general:
2
+ artifacts:
3
+ - "screenshots"
4
+
5
+ test:
6
+ override:
7
+ - script/cibuild
@@ -0,0 +1,30 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require 'dvl/core/version'
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = 'dvl-core'
9
+ s.version = Dvl::Core::VERSION
10
+ s.required_ruby_version = Gem::Requirement.new('>= 2.0.0')
11
+ s.authors = ['Adam Becker']
12
+ s.summary = 'Base styles for the DOBT View Layer.'
13
+ s.email = 'adam@dobt.co'
14
+ s.license = 'MIT'
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {features,spec}/*`.split("\n")
17
+ s.homepage = 'http://github.com/dobtco/dvl-core'
18
+
19
+ s.add_dependency 'activesupport'
20
+ s.add_dependency 'coffee-script'
21
+ s.add_dependency 'erector-rails4'
22
+ s.add_dependency 'sass'
23
+
24
+ s.add_development_dependency 'capybara', '2.4.2'
25
+ s.add_development_dependency 'poltergeist', '1.5.1'
26
+ s.add_development_dependency 'rerun', '0.10.0'
27
+ s.add_development_dependency 'rspec', '3.1.0'
28
+ s.add_development_dependency 'sinatra', '1.4.5'
29
+ s.add_development_dependency 'sinatra-assetpack', '0.3.3'
30
+ end
@@ -0,0 +1,11 @@
1
+ require 'dvl/core/version'
2
+
3
+ if defined?(Rails)
4
+ module Dvl
5
+ module Core
6
+ class Engine < ::Rails::Engine
7
+ # nada
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module Dvl
2
+ module Core
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,252 @@
1
+ require 'sinatra/base'
2
+ require 'sinatra/assetpack'
3
+ require 'active_support/all'
4
+ require 'erector'
5
+ require 'dvl/core'
6
+
7
+ module AppHelpers
8
+ def docs(name, &block)
9
+ div.section_header name, id: name.downcase
10
+ yield
11
+ end
12
+ end
13
+
14
+ Erector::HTMLWidget.send(:include, AppHelpers)
15
+
16
+ class App < Sinatra::Base
17
+
18
+ set :root, File.dirname(__FILE__)
19
+ set :scss, { load_paths: [ "#{self.root}/../vendor/assets/stylesheets/dvl" ] }
20
+
21
+ register Sinatra::AssetPack
22
+
23
+ assets do
24
+ serve '/css', from: '../vendor/assets/stylesheets'
25
+ serve '/js', from: '../vendor/assets/javascripts'
26
+ end
27
+
28
+ get '/' do
29
+ Erector.inline {
30
+ rawtext '<!doctype html>'
31
+ html {
32
+ head {
33
+ link href: '//fonts.googleapis.com/css?family=Open+Sans:400,300,700,600', rel: 'stylesheet', type: 'text/css'
34
+
35
+ link href: '/css/dvl/core.css', rel: 'stylesheet', type: 'text/css', media: 'all'
36
+ style(type: 'text/css') {
37
+ rawtext %{
38
+ body {
39
+ padding: 0 1rem 1rem;
40
+ background: white;
41
+ }
42
+
43
+ .section_header {
44
+ font-size: 1.6rem;
45
+ padding: 1rem 0 0.25rem;
46
+ margin-bottom: 1rem;
47
+ border-bottom: 1px solid #eee;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ body {
53
+ docs 'Buttons' do
54
+ a.button 'Yo!'
55
+ text ' '
56
+ a.button.info 'Info'
57
+ text ' '
58
+ a.button.primary 'Primary'
59
+ text ' '
60
+ a.button.success 'Success'
61
+ text ' '
62
+ a.button.white 'White'
63
+ end
64
+
65
+ docs 'Code' do
66
+ pre %{<p>This is some awesome code</p>}
67
+ p %{This is a paragraph with <code>code</code>.}.html_safe
68
+ end
69
+
70
+ docs 'Dropdowns' do
71
+ span.dropdown {
72
+ a.dropdown_toggle 'Click me',
73
+ 'data-toggle' => 'dropdown'
74
+ div.dropdown_menu {
75
+ ul.dropdown_body {
76
+ li {
77
+ a 'Hey!'
78
+ }
79
+ li {
80
+ a 'No!'
81
+ }
82
+ }
83
+ }
84
+ }
85
+ end
86
+
87
+ docs 'Forms' do
88
+ form {
89
+ input type: 'text'
90
+ label.checkbox {
91
+ input type: 'checkbox'
92
+ text 'Foo'
93
+ }
94
+ div.form_actions {
95
+ button.button.primary 'Submit'
96
+ }
97
+ }
98
+ end
99
+
100
+ docs 'Grid' do
101
+ div.grid {
102
+ div.item.six_columns 'six_columns'
103
+ div.item.six_columns 'six_columns'
104
+ }
105
+ div.grid.gutter_none {
106
+ div.item.three_columns 'three_columns (gutter_none)'
107
+ div.item.three_columns 'three_columns (gutter_none)'
108
+ div.item.three_columns 'three_columns (gutter_none)'
109
+ div.item.three_columns 'three_columns (gutter_none)'
110
+ }
111
+ end
112
+
113
+ docs 'Labels' do
114
+ span.label.label_error 'Error'
115
+ text ' '
116
+ span.label.label_success 'Success'
117
+ text ' '
118
+ span.label.label_info 'Info'
119
+ text ' '
120
+ span.label.label_warning 'Warning'
121
+ end
122
+
123
+ docs 'Links' do
124
+ a.uppercase 'Uppercase'
125
+ text ' '
126
+ a.smallbold 'Smallbold'
127
+ end
128
+
129
+ docs 'Lists' do
130
+ ul {
131
+ li 'This'
132
+ li 'is a'
133
+ li 'list!'
134
+ }
135
+ end
136
+
137
+ docs 'Modals' do
138
+ a 'Open modal', 'data-toggle' => 'modal', href: '#modal'
139
+ div(class: 'modal', tabindex: '-1', id: 'modal') {
140
+ div.modal_dialog {
141
+ div.modal_content {
142
+ div.modal_header {
143
+ a.close '&times;'.html_safe, 'data-dismiss' => 'modal'
144
+ h3 'Awesome modal'.html_safe
145
+ }
146
+
147
+ div.modal_body {
148
+ text 'This is the modal body!'
149
+ }
150
+
151
+ div.modal_footer {
152
+ text 'This is the modal footer!'
153
+ }
154
+ }
155
+ }
156
+ }
157
+ end
158
+
159
+ docs 'Pagination' do
160
+ div(class: 'pagination-wrapper') {
161
+ ul {
162
+ li { a '‹' }
163
+ li { a '1' }
164
+ li { span '2' }
165
+ li { a '3' }
166
+ li { a '›' }
167
+ }
168
+ }
169
+ end
170
+
171
+ docs 'Progress' do
172
+ div.progress {
173
+ div.progress_inner(style: "width: 30%") {
174
+ text '30%'
175
+ }
176
+ }
177
+ end
178
+
179
+ docs 'Sidebar' do
180
+ div.sidebar_box {
181
+ ul.sidebar_data {
182
+ li {
183
+ div.sidebar_data_icon {
184
+ i '✓'
185
+ }
186
+ div.sidebar_data_text {
187
+ div.sidebar_data_label 'Label'
188
+ div.sidebar_data_value 'Value'
189
+ div.sidebar_data_details 'Details'
190
+ }
191
+ }
192
+ }
193
+ }
194
+ end
195
+
196
+ docs 'Tables' do
197
+ table.stripes {
198
+ thead {
199
+ tr {
200
+ th 'ID'
201
+ th 'Name'
202
+ }
203
+ }
204
+ tbody {
205
+ tr {
206
+ td '1'
207
+ td 'Bob'
208
+ }
209
+ tr {
210
+ td '2'
211
+ td 'Job'
212
+ }
213
+ }
214
+ }
215
+ end
216
+
217
+ docs 'Tooltips' do
218
+ %w(top right bottom left).each do |x|
219
+ a x.capitalize,
220
+ 'data-toggle' => 'tooltip',
221
+ 'data-placement' => x,
222
+ 'data-container' => 'body',
223
+ title: "Tooltip on the #{x}!"
224
+ text ' '
225
+ end
226
+ end
227
+
228
+ docs 'Typography' do
229
+ h1 'Heading 1'
230
+ h2 'Heading 2'
231
+ h3 'Heading 3'
232
+ h4 'Heading 4'
233
+ h5 'Heading 5'
234
+ h6 'Heading 6'
235
+ p 'Lorem ipsum.'
236
+ end
237
+
238
+ script src: '//code.jquery.com/jquery-1.11.1.min.js'
239
+ script src: '/js/dvl/core/modals.js'
240
+ script src: '/js/dvl/core/dropdowns.js'
241
+ script src: '/js/dvl/core/tooltips.js'
242
+ script src: '/js/dvl/core/buttons.js'
243
+ script %{
244
+ $('[data-toggle="tooltip"]').tooltip()
245
+ }.html_safe
246
+ }
247
+ }
248
+ }.to_html
249
+ end
250
+
251
+ run! if app_file == $0
252
+ end
@@ -0,0 +1,45 @@
1
+ #! /bin/bash
2
+
3
+ ## Make sure we're in the project root
4
+ cd $(dirname "$0")/..
5
+
6
+ ## Check dependencies
7
+ printf "Checking dependencies... "
8
+
9
+ deps=(
10
+ ruby
11
+ bundler
12
+ git
13
+ )
14
+
15
+ for i in "${deps[@]}"
16
+ do
17
+ :
18
+ if [ ! $(which $i) ]; then
19
+ printf "\nDependency check failed, file not in PATH: $i\n"
20
+ exit 1
21
+ fi
22
+ done
23
+
24
+ if [ -d ~/.rvm ]; then
25
+ ## Create .ruby-gemset if it doesn't exist
26
+ printf "Checking for .ruby-gemset... "
27
+
28
+ if [ ! -f .ruby-gemset ]; then
29
+ printf "\nWriting .ruby-gemset..."
30
+ printf 'dvl-core' >> .ruby-gemset
31
+ fi
32
+
33
+ printf "OK\n"
34
+
35
+ ## Ensure RVM is using our ruby + gemset
36
+ source ~/.rvm/scripts/rvm
37
+ rvm use `cat .ruby-version`
38
+ rvm gemset use --create `cat .ruby-gemset`
39
+ fi
40
+
41
+ ## Bundle
42
+ printf "Bundling...\n"
43
+ bundle install
44
+
45
+ printf "\n\nSuccess!\n\n"
@@ -0,0 +1,3 @@
1
+ #! /bin/sh
2
+
3
+ bundle exec rspec