rype 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +15 -37
  2. data/lib/rype/chat.rb +18 -0
  3. data/rype.gemspec +32 -16
  4. metadata +89 -36
data/Rakefile CHANGED
@@ -1,13 +1,8 @@
1
1
  require "rubygems"
2
- require "rake/gempackagetask"
3
- require "rake/rdoctask"
4
2
 
5
- require "spec"
6
- require "spec/rake/spectask"
7
- Spec::Rake::SpecTask.new do |t|
8
- t.spec_opts = %w(--format specdoc --colour)
9
- t.libs = ["spec"]
10
- end
3
+ require "rspec"
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new(:spec)
11
6
 
12
7
  require 'cucumber'
13
8
  require 'cucumber/rake/task'
@@ -26,35 +21,28 @@ spec = Gem::Specification.new do |s|
26
21
 
27
22
  # Change these as appropriate
28
23
  s.name = "rype"
29
- s.version = "0.1.0"
30
- s.summary = "Skype Api wrapper"
31
- s.author = "Niko Felger"
24
+ s.version = "0.0.2"
25
+ s.authors = ["Niko Felger"]
32
26
  s.email = "niko.felger@gmail.com"
33
27
  s.homepage = "http://github.com/nfelger/rype"
28
+ s.summary = %q{Unofficial Skype Api wrapper}
29
+ s.description = %q{Unofficial Skype Api wrapper}
34
30
 
35
- s.has_rdoc = false
36
- # You should probably have a README of some kind. Change the filename
37
- # as appropriate
38
- # s.extra_rdoc_files = %w(README)
39
- # s.rdoc_options = %w(--main README)
40
-
41
- # Add any extra files to include in the gem (like your README)
42
- s.files = %w(History.txt) + Dir.glob("{bin,spec,lib/**/*}")
43
- s.executables = FileList["bin/**"].map { |f| File.basename(f) }
31
+ s.files = `git ls-files`.split("\n")
32
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
33
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
44
34
  s.require_paths = ["lib"]
35
+ s.has_rdoc = false
45
36
 
46
- # If you want to depend on other gems, add them here, along with any
47
- # relevant versions
48
- # s.add_dependency("some_other_gem", "~> 0.1.0")
37
+ s.add_dependency("ruby-dbus", [">= 0.6"])
49
38
 
50
- # If your tests use any gems, include them here
51
39
  s.add_development_dependency("rspec")
52
40
  s.add_development_dependency("cucumber")
41
+ s.add_development_dependency("rake")
53
42
  end
54
43
 
55
- # To publish your gem online, install the 'gemcutter' gem; Read more
56
- # about that here: http://gemcutter.org/pages/gem_docs
57
- Rake::GemPackageTask.new(spec) do |pkg|
44
+ require "rubygems/package_task"
45
+ Gem::PackageTask.new(spec) do |pkg|
58
46
  pkg.gem_spec = spec
59
47
  end
60
48
 
@@ -66,13 +54,3 @@ end
66
54
 
67
55
  task :package => :gemspec
68
56
 
69
- # Generate documentation
70
- Rake::RDocTask.new do |rd|
71
- rd.rdoc_files.include("lib/**/*.rb")
72
- rd.rdoc_dir = "rdoc"
73
- end
74
-
75
- desc 'Clear out RDoc and generated packages'
76
- task :clean => [:clobber_rdoc, :clobber_package] do
77
- rm "#{spec.name}.gemspec"
78
- end
data/lib/rype/chat.rb CHANGED
@@ -24,5 +24,23 @@ module Rype
24
24
  def send_message(message)
25
25
  Api.invoke("CHATMESSAGE #{@chatname} #{message}")
26
26
  end
27
+
28
+ def topic(&block)
29
+ get_property('TOPIC', &block)
30
+ end
31
+
32
+ def members(&block)
33
+ get_property('MEMBERS') do |member_list|
34
+ yield member_list.split(/ /)
35
+ end
36
+ end
37
+
38
+ private
39
+ def get_property(property, &block)
40
+ return unless block_given?
41
+ Api.invoke("GET CHAT #{chatname} #{property}") do |message|
42
+ yield message.split[3..-1].join(' ')
43
+ end
44
+ end
27
45
  end
28
46
  end
data/rype.gemspec CHANGED
@@ -1,22 +1,38 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
2
 
4
3
  Gem::Specification.new do |s|
5
- s.version = "0.0.1"
6
- s.name = "rype"
7
- s.platform = Gem::Platform::RUBY
8
- s.authors = ["Niko Felger"]
9
- s.email = ["niko.felger@gmail.com"]
10
- s.homepage = "https://github.com/nfelger/rype"
11
- s.summary = %q{Unofficial Skype Api wrapper}
12
- s.description = %q{Unofficial Skype Api wrapper}
4
+ s.name = "rype"
5
+ s.version = "0.0.2"
13
6
 
14
- s.files = `git ls-files`.split("\n")
15
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Niko Felger"]
9
+ s.date = "2012-01-23"
10
+ s.description = "Unofficial Skype Api wrapper"
11
+ s.email = "niko.felger@gmail.com"
12
+ s.files = [".gitignore", ".travis.yml", "Gemfile", "History.txt", "LICENSE", "Rakefile", "examples/chats/echo_server.rb", "examples/chats/list_chats.rb", "examples/chats/send_chat.rb", "examples/start_skype", "features/receive_chatmessage.feature", "features/send_chatmessage.feature", "features/step_definitions/skype_steps.rb", "features/support/env.rb", "features/support/lib/fake_api.rb", "lib/rype.rb", "lib/rype/api.rb", "lib/rype/chat.rb", "lib/rype/chatmessage.rb", "lib/rype/events.rb", "readme.md", "rype.gemspec", "spec/lib/rype/chat_spec.rb", "spec/lib/rype_spec.rb", "spec/spec_helper.rb"]
13
+ s.homepage = "http://github.com/nfelger/rype"
17
14
  s.require_paths = ["lib"]
18
- s.has_rdoc = false
19
- s.rubygems_version = %q{1.3.7}
20
- s.add_dependency("ruby-dbus", [">= 0.6"])
21
- s.add_development_dependency("rspec")
15
+ s.rubygems_version = "1.8.10"
16
+ s.summary = "Unofficial Skype Api wrapper"
17
+
18
+ if s.respond_to? :specification_version then
19
+ s.specification_version = 3
20
+
21
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
22
+ s.add_runtime_dependency(%q<ruby-dbus>, [">= 0.6"])
23
+ s.add_development_dependency(%q<rspec>, [">= 0"])
24
+ s.add_development_dependency(%q<cucumber>, [">= 0"])
25
+ s.add_development_dependency(%q<rake>, [">= 0"])
26
+ else
27
+ s.add_dependency(%q<ruby-dbus>, [">= 0.6"])
28
+ s.add_dependency(%q<rspec>, [">= 0"])
29
+ s.add_dependency(%q<cucumber>, [">= 0"])
30
+ s.add_dependency(%q<rake>, [">= 0"])
31
+ end
32
+ else
33
+ s.add_dependency(%q<ruby-dbus>, [">= 0.6"])
34
+ s.add_dependency(%q<rspec>, [">= 0"])
35
+ s.add_dependency(%q<cucumber>, [">= 0"])
36
+ s.add_dependency(%q<rake>, [">= 0"])
37
+ end
22
38
  end
metadata CHANGED
@@ -1,45 +1,88 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rype
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Niko Felger
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-01-22 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-01-23 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ type: :runtime
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 7
28
+ segments:
29
+ - 0
30
+ - 6
31
+ version: "0.6"
32
+ prerelease: false
15
33
  name: ruby-dbus
16
- requirement: &7610360 !ruby/object:Gem::Requirement
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ type: :development
37
+ requirement: &id002 !ruby/object:Gem::Requirement
17
38
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0.6'
22
- type: :runtime
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
23
46
  prerelease: false
24
- version_requirements: *7610360
25
- - !ruby/object:Gem::Dependency
26
47
  name: rspec
27
- requirement: &7609960 !ruby/object:Gem::Requirement
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ type: :development
51
+ requirement: &id003 !ruby/object:Gem::Requirement
28
52
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ prerelease: false
61
+ name: cucumber
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
33
64
  type: :development
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
34
74
  prerelease: false
35
- version_requirements: *7609960
75
+ name: rake
76
+ version_requirements: *id004
36
77
  description: Unofficial Skype Api wrapper
37
- email:
38
- - niko.felger@gmail.com
78
+ email: niko.felger@gmail.com
39
79
  executables: []
80
+
40
81
  extensions: []
82
+
41
83
  extra_rdoc_files: []
42
- files:
84
+
85
+ files:
43
86
  - .gitignore
44
87
  - .travis.yml
45
88
  - Gemfile
@@ -65,28 +108,38 @@ files:
65
108
  - spec/lib/rype/chat_spec.rb
66
109
  - spec/lib/rype_spec.rb
67
110
  - spec/spec_helper.rb
68
- homepage: https://github.com/nfelger/rype
111
+ homepage: http://github.com/nfelger/rype
69
112
  licenses: []
113
+
70
114
  post_install_message:
71
115
  rdoc_options: []
72
- require_paths:
116
+
117
+ require_paths:
73
118
  - lib
74
- required_ruby_version: !ruby/object:Gem::Requirement
119
+ required_ruby_version: !ruby/object:Gem::Requirement
75
120
  none: false
76
- requirements:
77
- - - ! '>='
78
- - !ruby/object:Gem::Version
79
- version: '0'
80
- required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ hash: 3
125
+ segments:
126
+ - 0
127
+ version: "0"
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
129
  none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ hash: 3
134
+ segments:
135
+ - 0
136
+ version: "0"
86
137
  requirements: []
138
+
87
139
  rubyforge_project:
88
140
  rubygems_version: 1.8.10
89
141
  signing_key:
90
142
  specification_version: 3
91
143
  summary: Unofficial Skype Api wrapper
92
144
  test_files: []
145
+