consular-osx 1.0.0.rc1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Consular - OSX Core
2
+
3
+ Automate your OSX Terminal with Consular
4
+
5
+
6
+ # Setup && Installation
7
+
8
+ If you haven't already, install Consular:
9
+
10
+ gem install consular
11
+
12
+ then install consular-osx:
13
+
14
+ gem install consular-osx
15
+
16
+
17
+ next, run `init`:
18
+
19
+ consular init
20
+
21
+ This will generate a global directory and also a `.consularc` in your home
22
+ directory. On the top of your `.consularc`, just require this core like
23
+ so:
24
+
25
+ ```ruby
26
+ # You can require your additional core gems here.
27
+ require 'consular/osx'
28
+
29
+ # You can set specific Consular configurations
30
+ # here.
31
+ Consular.configure do |c|
32
+ end
33
+ ```
34
+
35
+ Now you can use OSX Terminal to run your Consular scripts!
data/consular-osx.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "consular-osx"
6
- s.version = '1.0.0.rc1'
6
+ s.version = '1.0.0'
7
7
  s.authors = ["Arthur Chiu"]
8
8
  s.email = ["mr.arthur.chiu@gmail.com"]
9
9
  s.homepage = ""
data/lib/consular/osx.rb CHANGED
@@ -18,12 +18,19 @@ module Consular
18
18
 
19
19
  class << self
20
20
 
21
- # Checks to see if the current system is on darwin.
22
- # TODO: strengthen this system check.
21
+ # Checks to see if the current system is on darwin and if
22
+ # $TERM_PROGRAM is set to Apple_Terminal.
23
23
  #
24
24
  # @api public
25
25
  def valid_system?
26
- RUBY_PLATFORM.downcase =~ /darwin/
26
+ (RUBY_PLATFORM.downcase =~ /darwin/) && ENV['TERM_PROGRAM'] == 'Apple_Terminal'
27
+ end
28
+
29
+ # Returns name of Core. used in CLI core selection
30
+ #
31
+ # @api public
32
+ def to_s
33
+ "Consular::OSX Mac OSX Terminal"
27
34
  end
28
35
  end
29
36
 
data/spec/osx_spec.rb CHANGED
@@ -6,6 +6,10 @@ describe Consular::OSX do
6
6
  @core = Consular::OSX.new File.expand_path('../fixtures/bar.term', __FILE__)
7
7
  end
8
8
 
9
+ it "should return name of core with #to_s" do
10
+ assert_equal "Consular::OSX Mac OSX Terminal", Consular::OSX.to_s
11
+ end
12
+
9
13
  it "should have ALLOWED_OPTIONS" do
10
14
  options = Consular::OSX::ALLOWED_OPTIONS
11
15
 
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consular-osx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15424055
5
- prerelease: 6
4
+ hash: 23
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
9
  - 0
10
- - rc
11
- - 1
12
- version: 1.0.0.rc1
10
+ version: 1.0.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - Arthur Chiu
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2011-10-09 00:00:00 -07:00
18
+ date: 2011-10-27 00:00:00 -07:00
21
19
  default_executable:
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
@@ -88,6 +86,7 @@ extra_rdoc_files: []
88
86
  files:
89
87
  - .gitignore
90
88
  - Gemfile
89
+ - README.md
91
90
  - Rakefile
92
91
  - consular-osx.gemspec
93
92
  - lib/consular/osx.rb
@@ -116,14 +115,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
115
  required_rubygems_version: !ruby/object:Gem::Requirement
117
116
  none: false
118
117
  requirements:
119
- - - ">"
118
+ - - ">="
120
119
  - !ruby/object:Gem::Version
121
- hash: 25
120
+ hash: 3
122
121
  segments:
123
- - 1
124
- - 3
125
- - 1
126
- version: 1.3.1
122
+ - 0
123
+ version: "0"
127
124
  requirements: []
128
125
 
129
126
  rubyforge_project: consular-osx