palette 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -10,6 +10,8 @@ GEM
10
10
  background_process
11
11
  cucumber (~> 0.9.3)
12
12
  background_process (1.2)
13
+ bourne (1.0)
14
+ mocha (= 0.9.8)
13
15
  builder (2.1.2)
14
16
  cucumber (0.9.3)
15
17
  builder (~> 2.1.2)
@@ -22,7 +24,7 @@ GEM
22
24
  json (~> 1.4.6)
23
25
  term-ansicolor (~> 1.0.5)
24
26
  json (1.4.6)
25
- mocha (0.9.9)
27
+ mocha (0.9.8)
26
28
  rake
27
29
  rake (0.8.7)
28
30
  rspec (1.3.0)
@@ -33,7 +35,8 @@ PLATFORMS
33
35
 
34
36
  DEPENDENCIES
35
37
  aruba (= 0.2.4)
38
+ bourne (= 1.0)
36
39
  cucumber (= 0.9.3)
37
- mocha (= 0.9.9)
40
+ mocha (= 0.9.8)
38
41
  palette!
39
42
  rspec (= 1.3.0)
data/README.markdown CHANGED
@@ -10,11 +10,9 @@ Install with Rubygems:
10
10
 
11
11
  ## Usage
12
12
 
13
- puts Palette::Dsl.run lambda {
14
- vim_colors "great" do
15
- # rules etc go here
16
- end
17
- }
13
+ From your terminal:
14
+
15
+ palette path/to/color_scheme
18
16
 
19
17
  ## Syntax
20
18
 
data/Rakefile CHANGED
@@ -1,2 +1,17 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
+
4
+ Bundler.require
5
+
6
+ require "spec/rake/spectask"
7
+ require "cucumber/rake/task"
8
+
9
+ Spec::Rake::SpecTask.new('spec') do |t|
10
+ t.spec_files = FileList['spec/**/*.rb']
11
+ end
12
+
13
+ Cucumber::Rake::Task.new(:features) do |t|
14
+ t.cucumber_opts = "features --format pretty"
15
+ end
16
+
17
+ task :default => [:spec, :features]
data/features/cli.feature CHANGED
@@ -11,3 +11,14 @@ Feature: Run palette from the command line
11
11
  When I run "palette features/fixtures/schemes/missing_scheme"
12
12
  Then the output should not contain "colors_name"
13
13
  And the exit status should be 0
14
+
15
+ Scenario: Process a file with invalid palette syntax
16
+ Given a file named "features/fixtures/schemes/invalid_scheme" with:
17
+ """
18
+ vim_colors "bad syntax" do
19
+ totally made up junk
20
+ end
21
+ """
22
+ When I run "palette features/fixtures/schemes/invalid_scheme"
23
+ Then the exit status should be 1
24
+ And the output should contain "Please check the syntax of your palette file"
@@ -1,4 +1,12 @@
1
- vim_colors "awesomeness" do
1
+ vim_colors "sweet" do
2
2
  author "Josh Clayton"
3
- Normal "333", "FFF"
3
+ notes "My really sweet theme"
4
+
5
+ reset true
6
+ background :light
7
+
8
+ Normal "222", "f8f8ff"
9
+
10
+ Folded "808080", "ECECEC", :gui => "bold"
11
+ link :vimFold, :FoldColumn, :to => :Folded
4
12
  end
@@ -4,7 +4,8 @@ require "aruba"
4
4
 
5
5
  Before do
6
6
  schemes_origin_dir = File.join(%w(features fixtures schemes))
7
- schemes_dir = File.join(dirs.first, schemes_origin_dir)
7
+ schemes_dir = File.join(dirs.first, schemes_origin_dir)
8
+
8
9
  FileUtils.mkdir_p(schemes_dir)
9
10
  FileUtils.cp(Dir.glob(File.join(schemes_origin_dir, "*")), schemes_dir)
10
11
  end
data/lib/palette/cli.rb CHANGED
@@ -3,9 +3,14 @@ module Palette
3
3
  class Cli
4
4
  def initialize(*args)
5
5
  if File.exist?(path = File.expand_path(args.first))
6
- puts Palette::Dsl.run lambda {
7
- eval(IO.read(path), binding, path)
8
- }
6
+ begin
7
+ puts Palette::Dsl.run lambda {
8
+ eval(IO.read(path), binding, path)
9
+ }
10
+ rescue
11
+ p "Please check the syntax of your palette file"
12
+ exit 1
13
+ end
9
14
  end
10
15
  end
11
16
  end
@@ -1,3 +1,3 @@
1
1
  module Palette
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "spec"
2
2
  require "mocha"
3
3
  require "palette"
4
+ require "bourne"
4
5
 
5
6
  Spec::Runner.configure do |config|
6
7
  config.mock_with :mocha
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: palette
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Clayton
@@ -42,18 +42,33 @@ dependencies:
42
42
  requirements:
43
43
  - - "="
44
44
  - !ruby/object:Gem::Version
45
- hash: 41
45
+ hash: 43
46
46
  segments:
47
47
  - 0
48
48
  - 9
49
- - 9
50
- version: 0.9.9
49
+ - 8
50
+ version: 0.9.8
51
51
  type: :development
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
- name: cucumber
54
+ name: bourne
55
55
  prerelease: false
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - "="
60
+ - !ruby/object:Gem::Version
61
+ hash: 15
62
+ segments:
63
+ - 1
64
+ - 0
65
+ version: "1.0"
66
+ type: :development
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: cucumber
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
57
72
  none: false
58
73
  requirements:
59
74
  - - "="
@@ -65,11 +80,11 @@ dependencies:
65
80
  - 3
66
81
  version: 0.9.3
67
82
  type: :development
68
- version_requirements: *id003
83
+ version_requirements: *id004
69
84
  - !ruby/object:Gem::Dependency
70
85
  name: aruba
71
86
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
87
+ requirement: &id005 !ruby/object:Gem::Requirement
73
88
  none: false
74
89
  requirements:
75
90
  - - "="
@@ -81,7 +96,7 @@ dependencies:
81
96
  - 4
82
97
  version: 0.2.4
83
98
  type: :development
84
- version_requirements: *id004
99
+ version_requirements: *id005
85
100
  description: Palette provides an easy way to build Vim color schemes
86
101
  email:
87
102
  - joshua.clayton@gmail.com