shipd_style 0.2.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9b3faf3acf3e5b49ff9356f4628daa71ea3f065
4
- data.tar.gz: 51454b19c592e1c826f2be49209693250b94a4e7
3
+ metadata.gz: 1b1b787376bbb5afd7ca911c186127d1165e8aec
4
+ data.tar.gz: 904bf99fbac241c8c1330ec4831c57eeb70255ff
5
5
  SHA512:
6
- metadata.gz: f4a5a26463c3305595e1618e752c44d12eba2329214f9fee7cd3ea2d199d4ebca4396ca45802810938d5d2eabf7101ae1b913f318d50b27c22cc9925148e6651
7
- data.tar.gz: 68b8d99f0c45bd9cbeeee8d4f02cb675cc158d9d1b4cbe7f3a303550b522c1806e3c9351ae696da87481f2ff683d614e9a2d34108574b4c01cbe81fca0e8e196
6
+ metadata.gz: 0e36f286b19f8a8440cdbe5032fae18c35c9dffa522dc6ba76d57a28b5b0fe114e64556c2d5ef069f55db1c2209123f7984ce0086c7d654ea3cd1893bec7019c
7
+ data.tar.gz: 3801f1f4142644d720837c39e01e3228f79bd03ca201ff6750deb64b4eb7aa7e5bfe2098bd928ce117a27cd52d2f8847d3feba79c8c059498a4a8399ae356547
data/.gitignore CHANGED
@@ -23,3 +23,4 @@ mkmf.log
23
23
 
24
24
  .sass-cache/
25
25
  lib/sass/*.css
26
+ spec/support/copy_dir
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -1,13 +1,17 @@
1
1
  module ShipdStyle
2
- class CopyDirectory < Struct.new(:new_path, :directory_name)
2
+ class CopyDirectory < Struct.new(:path, :directory_name)
3
3
  def perform
4
4
  make_directory
5
5
  # still using tick marks because of the * at the end of the path
6
- `cp -r #{source_directory} #{new_path}`
6
+ `cp -r #{source_directory} #{destination_directory}`
7
7
  end
8
8
 
9
9
  def make_directory
10
- FileUtils.mkdir_p(new_path) unless File.exist?(new_path)
10
+ FileUtils.mkdir_p(destination_directory) unless File.exist?(destination_directory)
11
+ end
12
+
13
+ def destination_directory
14
+ "#{path}/#{directory_name}"
11
15
  end
12
16
 
13
17
  def source_directory
@@ -5,17 +5,17 @@ module ShipdStyle
5
5
  end
6
6
 
7
7
  def remove_namespace
8
- sass_path = copier.source_path
9
- FileUtils.mv(sass_path + "/shipd-mobile.scss", sass_path + "/mobile.scss")
10
- FileUtils.mv(sass_path + "/shipd-tablet.scss", sass_path + "/tablet.scss")
11
- FileUtils.mv(sass_path + "/shipd-desktop.scss", sass_path + "/desktop.scss")
8
+ destination_directory = copier.destination_directory
9
+ FileUtils.mv(destination_directory + "/shipd-mobile.scss", destination_directory + "/mobile.scss")
10
+ FileUtils.mv(destination_directory + "/shipd-tablet.scss", destination_directory + "/tablet.scss")
11
+ FileUtils.mv(destination_directory + "/shipd-desktop.scss", destination_directory + "/desktop.scss")
12
12
  # inside contents have to be re-written too:
13
- contents = File.read(sass_path + "/shipd-all.scss")
13
+ contents = File.read(destination_directory + "/shipd-all.scss")
14
14
  contents.gsub!("shipd-", "")
15
- File.open(sass_path + "/all.scss", 'w+') do |f|
15
+ File.open(destination_directory + "/all.scss", 'w+') do |f|
16
16
  f.write contents
17
17
  end
18
- FileUtils.rm(sass_path + "/shipd-all.scss")
18
+ FileUtils.rm(destination_directory + "/shipd-all.scss")
19
19
  end
20
20
 
21
21
  def copier
@@ -1,3 +1,3 @@
1
1
  module ShipdStyle
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -22,4 +22,5 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "rspec"
25
26
  end
@@ -0,0 +1,34 @@
1
+ require 'spec_helper'
2
+
3
+ require_relative "../lib/shipd_style/copy_directory"
4
+ require_relative "../lib/shipd_style/copy_stylesheets"
5
+
6
+ RSpec.describe ShipdStyle::CopyStylesheets do
7
+ let(:copier) { ShipdStyle::CopyStylesheets.new(copy_dir) }
8
+ let(:copy_dir) { File.dirname(__FILE__) + "/support/copy_dir" }
9
+
10
+ before { `rm -rf #{copy_dir}/*` }
11
+
12
+ describe "#perform" do
13
+ it "copies over shipd style sass sheets" do
14
+ copier.perform
15
+ expect(File.exist?(copy_dir + "/sass")).to be(true)
16
+ end
17
+ end
18
+
19
+ describe "#remove_namespace" do
20
+ before { copier.perform }
21
+ let(:all_scss_content) { File.read(copy_dir + "/sass/all.scss") }
22
+
23
+ it "renames the base style sheets to not include shipd" do
24
+ copier.remove_namespace
25
+ expect(File.exist?(copy_dir + "/sass/shipd-mobile.scss")).not_to be(true)
26
+ expect(File.exist?(copy_dir + "/sass/mobile.scss")).to be(true)
27
+ end
28
+
29
+ it "changes the content of the all.scss file" do
30
+ copier.remove_namespace
31
+ expect(all_scss_content).not_to include("shipd-")
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,91 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Limits the available syntax to the non-monkey patched syntax that is
54
+ # recommended. For more details, see:
55
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
56
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
57
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
58
+ config.disable_monkey_patching!
59
+
60
+ # This setting enables warnings. It's recommended, but in some cases may
61
+ # be too noisy due to issues in dependencies.
62
+ config.warnings = true
63
+
64
+ # Many RSpec users commonly either run the entire suite or an individual
65
+ # file, and it's useful to allow more verbose output when running an
66
+ # individual spec file.
67
+ if config.files_to_run.one?
68
+ # Use the documentation formatter for detailed output,
69
+ # unless a formatter has already been configured
70
+ # (e.g. via a command-line flag).
71
+ config.default_formatter = 'doc'
72
+ end
73
+
74
+ # Print the 10 slowest examples and example groups at the
75
+ # end of the spec run, to help surface which specs are running
76
+ # particularly slow.
77
+ config.profile_examples = 10
78
+
79
+ # Run specs in random order to surface order dependencies. If you find an
80
+ # order dependency and want to debug it, you can fix the order by providing
81
+ # the seed, which is printed after each run.
82
+ # --seed 1234
83
+ config.order = :random
84
+
85
+ # Seed global randomization in this process using the `--seed` CLI option.
86
+ # Setting this allows you to use `--seed` to deterministically reproduce
87
+ # test failures related to randomization by passing the same `--seed` value
88
+ # as the one that triggered the failure.
89
+ Kernel.srand config.seed
90
+ =end
91
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipd_style
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kane Baccigalupi
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: ShipdStyle is a compass driven CSS3 framework that makes building responsive
56
70
  designs easy, and extensible.
57
71
  email:
@@ -61,6 +75,7 @@ extensions: []
61
75
  extra_rdoc_files: []
62
76
  files:
63
77
  - ".gitignore"
78
+ - ".rspec"
64
79
  - ".ruby-gemset"
65
80
  - ".ruby-version"
66
81
  - Gemfile
@@ -118,6 +133,9 @@ files:
118
133
  - lib/templates/dialog.html
119
134
  - lib/templates/page-layout.html
120
135
  - shipd_style.gemspec
136
+ - spec/copy_spreadsheet_spec.rb
137
+ - spec/spec_helper.rb
138
+ - spec/support/copy_dir/.gitkeep
121
139
  homepage: https://github.com/shipd/shipd_style
122
140
  licenses:
123
141
  - MIT
@@ -142,4 +160,7 @@ rubygems_version: 2.2.2
142
160
  signing_key:
143
161
  specification_version: 4
144
162
  summary: Responsive Design CSS3 Compass Framework
145
- test_files: []
163
+ test_files:
164
+ - spec/copy_spreadsheet_spec.rb
165
+ - spec/spec_helper.rb
166
+ - spec/support/copy_dir/.gitkeep