prompter 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. data/LICENSE +1 -1
  2. data/README.rdoc +1 -1
  3. data/VERSION +1 -1
  4. data/lib/prompter.rb +20 -0
  5. data/prompter.gemspec +13 -20
  6. metadata +55 -51
  7. data/.gitignore +0 -24
  8. data/Rakefile +0 -60
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Domizio Demichelis
1
+ Copyright (c) 2010-2012 Domizio Demichelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -52,4 +52,4 @@ All the methods are yard-documented, and there is and 'example/wizard.rb' that c
52
52
 
53
53
  == Copyright
54
54
 
55
- Copyright (c) 2010 Domizio Demichelis. See LICENSE for details.
55
+ Copyright (c) 2010-2012 Domizio Demichelis. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -10,6 +10,8 @@ class Prompter
10
10
 
11
11
  @dye_styles = { :say_style => nil,
12
12
  :say_echo_style => nil,
13
+ :say_ok_style => :green,
14
+ :say_log_style => :blue,
13
15
  :say_notice_style => :yellow,
14
16
  :say_warning_style => :red,
15
17
  :say_title_style => [:cyan, :bold, :reversed],
@@ -69,6 +71,24 @@ class Prompter
69
71
  $stdout.flush
70
72
  end
71
73
 
74
+ # Shows a colored message. It uses :say passing the :say_ok_style :style option
75
+ #
76
+ # @see #say
77
+ #
78
+ def say_ok(message="", opts={})
79
+ opts = { :style => :say_ok_style }.merge opts
80
+ say message, opts
81
+ end
82
+
83
+ # Shows a colored message. It uses :say passing the :say_log_style :style option
84
+ #
85
+ # @see #say
86
+ #
87
+ def say_log(message="", opts={})
88
+ opts = { :style => :say_log_style }.merge opts
89
+ say message, opts
90
+ end
91
+
72
92
  # Shows a colored message. It uses :say passing the :say_notice_style :style option
73
93
  #
74
94
  # @see #say
@@ -1,28 +1,21 @@
1
- name = File.basename( __FILE__, '.gemspec' )
2
- version = File.read(File.expand_path('../VERSION', __FILE__)).strip
3
1
  require 'date'
4
2
 
5
3
  Gem::Specification.new do |s|
6
-
7
- s.authors = ["Domizio Demichelis"]
8
- s.email = 'dd.nexus@gmail.com'
9
- s.homepage = "http://github.com/ddnexus/#{name}"
10
- s.summary = 'Makes your prompts easier to build and prettier to look'
11
- s.description = 'A few helpers to create colored, multistep and hierarchical wizards'
12
-
4
+ s.name = 'prompter'
5
+ s.authors = ["Domizio Demichelis"]
6
+ s.email = 'dd.nexus@gmail.com'
7
+ s.homepage = "http://github.com/ddnexus/prompter"
8
+ s.summary = 'Makes your prompts easier to build and prettier to look'
9
+ s.description = 'A few helpers to create colored, multistep and hierarchical wizards'
10
+ s.require_paths = ["lib"]
11
+ s.has_rdoc = 'yard'
12
+ s.files = `git ls-files -z`.split("\0")
13
+ s.version = File.read(File.expand_path('../VERSION', __FILE__)).strip
14
+ s.date = Date.today.to_s
15
+ s.required_rubygems_version = ">= 1.3.6"
16
+ s.extra_rdoc_files = ["README.rdoc"]
13
17
  s.add_runtime_dependency('dye', [">= 0.1.1"])
14
18
  s.add_runtime_dependency('yard', [">= 0.6.3"])
15
19
  s.add_development_dependency('irt', [">= 1.1.2"])
16
20
 
17
- s.files = `git ls-files -z`.split("\0")
18
-
19
- s.name = name
20
- s.version = version
21
- s.date = Date.today.to_s
22
-
23
- s.required_rubygems_version = ">= 1.3.6"
24
- s.extra_rdoc_files = ["README.rdoc"]
25
- s.has_rdoc = 'yard'
26
- s.require_paths = ["lib"]
27
-
28
21
  end
metadata CHANGED
@@ -1,64 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: prompter
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
4
5
  prerelease:
5
- version: 0.1.5
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Domizio Demichelis
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-18 00:00:00 -04:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2013-08-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: dye
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
24
21
  version: 0.1.1
25
22
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: yard
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.1.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: yard
32
+ requirement: !ruby/object:Gem::Requirement
31
33
  none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
35
37
  version: 0.6.3
36
38
  type: :runtime
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: irt
40
39
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
42
41
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.6.3
46
+ - !ruby/object:Gem::Dependency
47
+ name: irt
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
46
53
  version: 1.1.2
47
54
  type: :development
48
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.2
49
62
  description: A few helpers to create colored, multistep and hierarchical wizards
50
63
  email: dd.nexus@gmail.com
51
64
  executables: []
52
-
53
65
  extensions: []
54
-
55
- extra_rdoc_files:
66
+ extra_rdoc_files:
56
67
  - README.rdoc
57
- files:
58
- - .gitignore
68
+ files:
59
69
  - LICENSE
60
70
  - README.rdoc
61
- - Rakefile
62
71
  - VERSION
63
72
  - examples/wizard.rb
64
73
  - lib/prompter.rb
@@ -68,33 +77,28 @@ files:
68
77
  - test/irt_helper.rb
69
78
  - test/say.irt
70
79
  - test/yes_no.irt
71
- has_rdoc: yard
72
80
  homepage: http://github.com/ddnexus/prompter
73
81
  licenses: []
74
-
75
82
  post_install_message:
76
83
  rdoc_options: []
77
-
78
- require_paths:
84
+ require_paths:
79
85
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
86
+ required_ruby_version: !ruby/object:Gem::Requirement
81
87
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: "0"
86
- required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
93
  none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
91
97
  version: 1.3.6
92
98
  requirements: []
93
-
94
99
  rubyforge_project:
95
- rubygems_version: 1.5.0
100
+ rubygems_version: 1.8.25
96
101
  signing_key:
97
102
  specification_version: 3
98
103
  summary: Makes your prompts easier to build and prettier to look
99
104
  test_files: []
100
-
data/.gitignore DELETED
@@ -1,24 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## Eclipse
22
- .loadpath
23
- .project
24
-
data/Rakefile DELETED
@@ -1,60 +0,0 @@
1
- name = 'prompter'
2
-
3
- def ensure_clean(action, force=false)
4
- if !force && ! `git status -s`.empty?
5
- puts <<-EOS.gsub(/^ {6}/, '')
6
- Rake task aborted: the working tree is dirty!
7
- If you know what you are doing you can use \`rake #{action}[force]\`"
8
- EOS
9
- exit(1)
10
- end
11
- end
12
-
13
- desc "Install the gem"
14
- task :install, :force do |t, args|
15
- ensure_clean(:install, args.force)
16
- orig_version = version = File.read('VERSION').strip
17
- begin
18
- commit_id = `git log -1 --format="%h" HEAD`.strip
19
- version = "#{orig_version}.#{commit_id}"
20
- File.open('VERSION', 'w') {|f| f.puts version }
21
- gem_name = "#{name}-#{version}.gem"
22
- sh %(gem build #{name}.gemspec)
23
- sh %(gem install #{gem_name} --local --no-rdoc --no-ri)
24
- puts <<-EOS.gsub(/^ {6}/, '')
25
-
26
- *******************************************************************************
27
- * NOTICE *
28
- *******************************************************************************
29
- * The version id of locally installed gems is comparable to a --pre version: *
30
- * i.e. it is alphabetically ordered (not numerically ordered), besides it *
31
- * includes the sah1 commit id which is not aphabetically ordered, so be sure *
32
- * your application picks the version you really intend to use *
33
- *******************************************************************************
34
-
35
- EOS
36
- ensure
37
- remove_entry_secure gem_name, true
38
- File.open('VERSION', 'w') {|f| f.puts orig_version }
39
- end
40
- end
41
-
42
- desc %(Remove all the "#{name}" installed gems and executables and install this version)
43
- task :clean_install, :force do |t, args|
44
- ensure_clean(:install, args.force)
45
- sh %(gem uninstall #{name} --all --ignore-dependencies --executables)
46
- Rake::Task['install'].invoke(args.force)
47
- end
48
-
49
- desc "Push the gem to rubygems.org"
50
- task :push, :force do |t, args|
51
- begin
52
- ensure_clean(:install, args.force)
53
- version = File.read('VERSION').strip
54
- gem_name = "#{name}-#{version}.gem"
55
- sh %(gem build #{name}.gemspec)
56
- sh %(gem push #{gem_name})
57
- ensure
58
- remove_entry_secure gem_name, true
59
- end
60
- end