llremote 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ *0.7.1* (26 June 2012)
2
+
3
+ * Updated docs
4
+ * Moved to Github
5
+ * Re-released using bundler
6
+ * Re-licensed under MIT license
7
+
1
8
  *0.7.0* (23 Oct 2009)
2
9
 
3
10
  * Added support for read-paths
data/LICENSE CHANGED
@@ -1,165 +1,22 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
-
9
- This version of the GNU Lesser General Public License incorporates
10
- the terms and conditions of version 3 of the GNU General Public
11
- License, supplemented by the additional permissions listed below.
12
-
13
- 0. Additional Definitions.
14
-
15
- As used herein, "this License" refers to version 3 of the GNU Lesser
16
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
- General Public License.
18
-
19
- "The Library" refers to a covered work governed by this License,
20
- other than an Application or a Combined Work as defined below.
21
-
22
- An "Application" is any work that makes use of an interface provided
23
- by the Library, but which is not otherwise based on the Library.
24
- Defining a subclass of a class defined by the Library is deemed a mode
25
- of using an interface provided by the Library.
26
-
27
- A "Combined Work" is a work produced by combining or linking an
28
- Application with the Library. The particular version of the Library
29
- with which the Combined Work was made is also called the "Linked
30
- Version".
31
-
32
- The "Minimal Corresponding Source" for a Combined Work means the
33
- Corresponding Source for the Combined Work, excluding any source code
34
- for portions of the Combined Work that, considered in isolation, are
35
- based on the Application, and not on the Linked Version.
36
-
37
- The "Corresponding Application Code" for a Combined Work means the
38
- object code and/or source code for the Application, including any data
39
- and utility programs needed for reproducing the Combined Work from the
40
- Application, but excluding the System Libraries of the Combined Work.
41
-
42
- 1. Exception to Section 3 of the GNU GPL.
43
-
44
- You may convey a covered work under sections 3 and 4 of this License
45
- without being bound by section 3 of the GNU GPL.
46
-
47
- 2. Conveying Modified Versions.
48
-
49
- If you modify a copy of the Library, and, in your modifications, a
50
- facility refers to a function or data to be supplied by an Application
51
- that uses the facility (other than as an argument passed when the
52
- facility is invoked), then you may convey a copy of the modified
53
- version:
54
-
55
- a) under this License, provided that you make a good faith effort to
56
- ensure that, in the event an Application does not supply the
57
- function or data, the facility still operates, and performs
58
- whatever part of its purpose remains meaningful, or
59
-
60
- b) under the GNU GPL, with none of the additional permissions of
61
- this License applicable to that copy.
62
-
63
- 3. Object Code Incorporating Material from Library Header Files.
64
-
65
- The object code form of an Application may incorporate material from
66
- a header file that is part of the Library. You may convey such object
67
- code under terms of your choice, provided that, if the incorporated
68
- material is not limited to numerical parameters, data structure
69
- layouts and accessors, or small macros, inline functions and templates
70
- (ten or fewer lines in length), you do both of the following:
71
-
72
- a) Give prominent notice with each copy of the object code that the
73
- Library is used in it and that the Library and its use are
74
- covered by this License.
75
-
76
- b) Accompany the object code with a copy of the GNU GPL and this license
77
- document.
78
-
79
- 4. Combined Works.
80
-
81
- You may convey a Combined Work under terms of your choice that,
82
- taken together, effectively do not restrict modification of the
83
- portions of the Library contained in the Combined Work and reverse
84
- engineering for debugging such modifications, if you also do each of
85
- the following:
86
-
87
- a) Give prominent notice with each copy of the Combined Work that
88
- the Library is used in it and that the Library and its use are
89
- covered by this License.
90
-
91
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
- document.
93
-
94
- c) For a Combined Work that displays copyright notices during
95
- execution, include the copyright notice for the Library among
96
- these notices, as well as a reference directing the user to the
97
- copies of the GNU GPL and this license document.
98
-
99
- d) Do one of the following:
100
-
101
- 0) Convey the Minimal Corresponding Source under the terms of this
102
- License, and the Corresponding Application Code in a form
103
- suitable for, and under terms that permit, the user to
104
- recombine or relink the Application with a modified version of
105
- the Linked Version to produce a modified Combined Work, in the
106
- manner specified by section 6 of the GNU GPL for conveying
107
- Corresponding Source.
108
-
109
- 1) Use a suitable shared library mechanism for linking with the
110
- Library. A suitable mechanism is one that (a) uses at run time
111
- a copy of the Library already present on the user's computer
112
- system, and (b) will operate properly with a modified version
113
- of the Library that is interface-compatible with the Linked
114
- Version.
115
-
116
- e) Provide Installation Information, but only if you would otherwise
117
- be required to provide such information under section 6 of the
118
- GNU GPL, and only to the extent that such information is
119
- necessary to install and execute a modified version of the
120
- Combined Work produced by recombining or relinking the
121
- Application with a modified version of the Linked Version. (If
122
- you use option 4d0, the Installation Information must accompany
123
- the Minimal Corresponding Source and Corresponding Application
124
- Code. If you use option 4d1, you must provide the Installation
125
- Information in the manner specified by section 6 of the GNU GPL
126
- for conveying Corresponding Source.)
127
-
128
- 5. Combined Libraries.
129
-
130
- You may place library facilities that are a work based on the
131
- Library side by side in a single library together with other library
132
- facilities that are not Applications and are not covered by this
133
- License, and convey such a combined library under terms of your
134
- choice, if you do both of the following:
135
-
136
- a) Accompany the combined library with a copy of the same work based
137
- on the Library, uncombined with any other library facilities,
138
- conveyed under the terms of this License.
139
-
140
- b) Give prominent notice with the combined library that part of it
141
- is a work based on the Library, and explaining where to find the
142
- accompanying uncombined form of the same work.
143
-
144
- 6. Revised Versions of the GNU Lesser General Public License.
145
-
146
- The Free Software Foundation may publish revised and/or new versions
147
- of the GNU Lesser General Public License from time to time. Such new
148
- versions will be similar in spirit to the present version, but may
149
- differ in detail to address new problems or concerns.
150
-
151
- Each version is given a distinguishing version number. If the
152
- Library as you received it specifies that a certain numbered version
153
- of the GNU Lesser General Public License "or any later version"
154
- applies to it, you have the option of following the terms and
155
- conditions either of that published version or of any later version
156
- published by the Free Software Foundation. If the Library as you
157
- received it does not specify a version number of the GNU Lesser
158
- General Public License, you may choose any version of the GNU Lesser
159
- General Public License ever published by the Free Software Foundation.
160
-
161
- If the Library as you received it specifies that a proxy can decide
162
- whether future versions of the GNU Lesser General Public License shall
163
- apply, that proxy's public statement of acceptance of any version is
164
- permanent authorization for you to choose that version for the
165
- Library.
1
+ Copyright (c) 2012 Wybo Wiersma
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -1,91 +1,6 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'rake/testtask'
4
- require 'rake/rdoctask'
5
- require 'rake/packagetask'
6
- require 'rake/gempackagetask'
7
- require 'rake/contrib/sshpublisher'
8
- require File.join(File.dirname(__FILE__), 'lib', 'l_l_remote', 'version')
9
-
10
- PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11
- PKG_NAME = 'llremote'
12
- PKG_VERSION = LLRemote::VERSION::STRING + PKG_BUILD
13
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
-
15
- RELEASE_NAME = "REL #{PKG_VERSION}"
16
-
17
- RUBY_FORGE_PROJECT = "llremote"
18
- RUBY_FORGE_USER = "wybow"
19
-
20
- desc "Default Task"
21
- task :default => [ :test ]
22
-
23
- # Run the unit tests
24
- Rake::TestTask.new { |t|
25
- t.libs << "test"
26
- t.pattern = 'test/*_test.rb'
27
- t.verbose = true
28
- t.warning = false
29
- }
30
-
31
- # Generate the RDoc documentation
32
- Rake::RDocTask.new { |rdoc|
33
- rdoc.rdoc_dir = 'doc'
34
- rdoc.title = "LLRemote -- Your remote control for LogiLogi"
35
- rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
36
- rdoc.options << '--charset' << 'utf-8'
37
- rdoc.rdoc_files.include('README', 'CHANGELOG')
38
- rdoc.rdoc_files.include('lib/l_l_remote.rb')
39
- rdoc.rdoc_files.include('lib/l_l_remote/*.rb')
40
- }
41
-
42
- # Create compressed packages
43
- spec = Gem::Specification.new do |s|
44
- s.platform = Gem::Platform::RUBY
45
- s.name = PKG_NAME
46
- s.summary = "Your remote control for LogiLogi."
47
- s.description = %q{Allows you to post and update logis remotely.}
48
- s.version = PKG_VERSION
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
49
3
 
50
- s.author = "Wybo Wiersma"
51
- s.email = "wybo@logilogi.org"
52
- s.rubyforge_project = "llremote"
53
- s.homepage = "http://llremote.rubyforge.org"
54
-
55
- s.has_rdoc = true
56
- s.requirements << 'none'
57
- s.require_path = 'lib'
58
-
59
- s.files = [ "Rakefile", "install.rb", "README", "CHANGELOG", "LICENSE" ]
60
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
61
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
62
- end
63
-
64
- Rake::GemPackageTask.new(spec) do |p|
65
- p.gem_spec = spec
66
- p.need_tar = true
67
- p.need_zip = true
68
- end
69
-
70
- desc "Publish the docs, gem, and release files"
71
- task :deploy => [:release, :pdoc] do
72
- puts 'Published gem'
73
- end
74
-
75
- desc "Publish the API documentation"
76
- task :pdoc => [:rdoc] do
77
- sh "rsync -azv --no-perms --no-times doc/*" +
78
- " rubyforge.org:/var/www/gforge-projects/llremote"
79
- end
80
-
81
- desc "Publish the release files to RubyForge."
82
- task :release => [ :package ] do
83
- require 'rubyforge'
84
- require 'rake/contrib/rubyforgepublisher'
85
-
86
- packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
87
-
88
- rubyforge = RubyForge.new.configure
89
- rubyforge.login
90
- rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
91
- end
4
+ task :default => :test
5
+ require 'rake/testtask'
6
+ Rake::TestTask.new
@@ -1,15 +1,3 @@
1
- #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
3
- #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
11
- #++#
12
- #
13
1
  # LLRemote::Logi is a logi that can be read and saved remotely
14
2
 
15
3
  class LLRemote::Logi
@@ -56,14 +44,14 @@ class LLRemote::Logi
56
44
  raise 'Logi needs link, body and title to be created'
57
45
  end
58
46
  collection = Atom::Pub::Collection.new(
59
- :href => LLRemote.server_url + "/do/logis/" + self.link + "/do.xml")
47
+ :href => LLRemote.server_url + '/do/logis/' + self.link + '/do.xml')
60
48
  entry = Atom::Entry.new do |e|
61
49
  e.title = self.title
62
50
  e.content = self.parse_body(self.body)
63
51
  e.categories = self.parse_tags(self.link)
64
52
  end
65
53
  begin
66
- entry = collection.publish(entry, :user => LLRemote.access_token, :pass => "")
54
+ entry = collection.publish(entry, :user => LLRemote.access_token, :pass => '')
67
55
  rescue
68
56
  raise 'Error: Could not create logi: ' + self.link +
69
57
  '. Wrong credentials ?'
@@ -84,7 +72,7 @@ class LLRemote::Logi
84
72
  entry.categories = self.parse_tags(self.link)
85
73
 
86
74
  begin
87
- entry.save!(:user => LLRemote.access_token, :pass => "")
75
+ entry.save!(:user => LLRemote.access_token, :pass => '')
88
76
  rescue
89
77
  raise 'Error: Could not update logi: ' + self.link +
90
78
  '. Wrong credentials ?'
@@ -111,16 +99,16 @@ class LLRemote::Logi
111
99
  end
112
100
 
113
101
  def unparse_link(raw_link)
114
- link = raw_link.gsub(LLRemote.server_url + "/","")
102
+ link = raw_link.gsub(LLRemote.server_url + '/','')
115
103
  link.strip!
116
104
  return link
117
105
  end
118
106
 
119
107
  def parse_body(raw_body)
120
108
  raw_body = raw_body.dup
121
- raw_body.gsub!(/^(\n|\s)*/,"")
122
- raw_body.gsub!(/(\n|\s)*$/,"")
109
+ raw_body.gsub!(/^(\n|\s)*/,'')
110
+ raw_body.gsub!(/(\n|\s)*$/,'')
123
111
  return Atom::Content::Html.new(
124
- "<p>" + raw_body.split("\n").join("</p> <p>") + "</p>")
112
+ '<p>' + raw_body.split("\n").join('</p> <p>') + '</p>')
125
113
  end
126
114
  end
@@ -1,9 +1,3 @@
1
1
  class LLRemote
2
- module VERSION #:nodoc:
3
- MAJOR = 0
4
- MINOR = 7
5
- TINY = 0
6
-
7
- STRING = [MAJOR, MINOR, TINY].join('.')
8
- end
2
+ VERSION = '0.7.1'
9
3
  end
data/lib/l_l_remote.rb CHANGED
@@ -1,27 +1,16 @@
1
1
  #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
2
+ # Copyright: (c) 2006-2012 Wybo Wiersma <mail@wybowiersma.net>
3
3
  #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
4
+ # MIT Licensed
11
5
  #++#
12
6
  #
13
7
  # LLRemote allows you to save logis remotely.
14
8
 
15
9
  require 'rubygems'
16
- gem 'activeresource'
17
- gem 'ratom'
18
10
  require 'atom'
19
11
  require 'atom/pub'
20
12
  require 'active_resource'
21
-
22
- $:.unshift(File.dirname(__FILE__)) unless
23
- $:.include?(File.dirname(__FILE__)) || $:.include?(
24
- File.expand_path(File.dirname(__FILE__)))
13
+ require 'l_l_remote/version'
25
14
 
26
15
  class LLRemote
27
16
  ### Class-attributes
@@ -52,9 +41,9 @@ FUN
52
41
 
53
42
  LLRemote.access_token = options[:access_token]
54
43
  if options[:server_url]
55
- LLRemote.server_url = options[:server_url].gsub(/\/$/,"")
44
+ LLRemote.server_url = options[:server_url].gsub(/\/$/,'')
56
45
  else
57
- LLRemote.server_url = "http://en.logilogi.org"
46
+ LLRemote.server_url = 'http://en.logilogi.org'
58
47
  end
59
48
  LLRemote::Path.setup
60
49
  LLRemote::Step.setup
@@ -66,8 +55,8 @@ FUN
66
55
  #
67
56
  def self.load_entry(link)
68
57
  begin
69
- return Atom::Entry.load_entry(URI.parse(LLRemote.server_url + "/" +
70
- link + "/do.xml"))
58
+ return Atom::Entry.load_entry(URI.parse(LLRemote.server_url + '/' +
59
+ link + '/do.xml'), :read_timeout => 60)
71
60
  rescue
72
61
  raise 'Error: Can\'t load: ' + link + '. Perhaps wrong link ?'
73
62
  end
data/test/helper.rb ADDED
@@ -0,0 +1,5 @@
1
+ $:.unshift File.expand_path('../../lib', __FILE__)
2
+
3
+ require 'stringio'
4
+ require 'test/unit'
5
+ require 'l_l_remote'
@@ -0,0 +1,12 @@
1
+ ['rubygems', 'require_relative'].each {|g| require g} if RUBY_VERSION =~ /1\.8/
2
+ require_relative 'helper'
3
+
4
+ class LLRemoteTest < Test::Unit::TestCase
5
+ ### Initialization
6
+
7
+ def test_initialize
8
+ LLRemote.setup(:access_token => 'Moo', :server_url => 'http://bod.com')
9
+ assert_equal 'Moo', LLRemote.access_token
10
+ assert_equal 'http://bod.com', LLRemote.server_url
11
+ end
12
+ end
data/test/test_logi.rb ADDED
@@ -0,0 +1,13 @@
1
+ ['rubygems', 'require_relative'].each {|g| require g} if RUBY_VERSION =~ /1\.8/
2
+ require_relative 'helper'
3
+
4
+ class LogiTest < Test::Unit::TestCase
5
+ ### Initialization
6
+
7
+ def test_initialize
8
+ l = LLRemote::Logi.new(:link => 'a', :title => 'b', :body => 'c')
9
+ assert_equal 'a', l.link
10
+ assert_equal 'b', l.title
11
+ assert_equal 'c', l.body
12
+ end
13
+ end
metadata CHANGED
@@ -1,68 +1,139 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: llremote
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.1
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Wybo Wiersma
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2009-10-23 00:00:00 +01:00
13
- default_executable:
14
- dependencies: []
15
-
16
- description: Allows you to post and update logis remotely.
17
- email: wybo@logilogi.org
12
+ date: 2012-06-27 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activeresource
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: ratom
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: test-unit
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: require_relative
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ description: LogiLogi API wrapper that allows you to update and create Logis on http://www.LogiLogi.org
95
+ from any application.
96
+ email:
97
+ - mail@wybowiersma.net
18
98
  executables: []
19
-
20
99
  extensions: []
21
-
22
100
  extra_rdoc_files: []
23
-
24
- files:
25
- - Rakefile
26
- - install.rb
27
- - README
101
+ files:
28
102
  - CHANGELOG
29
103
  - LICENSE
30
- - lib/l_l_remote/step.rb
104
+ - Rakefile
105
+ - lib/l_l_remote.rb
31
106
  - lib/l_l_remote/logi.rb
32
107
  - lib/l_l_remote/version.rb
33
- - lib/l_l_remote/path.rb
34
- - lib/l_l_remote.rb
35
108
  - lib/llremote.rb
36
- - test/l_l_remote_test.rb
37
- - test/test_helper.rb
38
- - test/logi_test.rb
39
- has_rdoc: true
40
- homepage: http://llremote.rubyforge.org
109
+ - test/helper.rb
110
+ - test/test_l_l_remote.rb
111
+ - test/test_logi.rb
112
+ homepage: http://github.com/wybo/llremote
41
113
  licenses: []
42
-
43
114
  post_install_message:
44
115
  rdoc_options: []
45
-
46
- require_paths:
116
+ require_paths:
47
117
  - lib
48
- required_ruby_version: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: "0"
53
- version:
54
- required_rubygems_version: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: "0"
59
- version:
60
- requirements:
61
- - none
62
- rubyforge_project: llremote
63
- rubygems_version: 1.3.5
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ! '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubyforge_project:
132
+ rubygems_version: 1.8.24
64
133
  signing_key:
65
134
  specification_version: 3
66
- summary: Your remote control for LogiLogi.
67
- test_files: []
68
-
135
+ summary: A gem wrapping the LogiLogi API
136
+ test_files:
137
+ - test/test_l_l_remote.rb
138
+ - test/test_logi.rb
139
+ has_rdoc:
data/README DELETED
@@ -1,82 +0,0 @@
1
- = LogiLogi Remote Gem documentation
2
- "Your remote control for LogiLogi"
3
-
4
- Allows you to update and create Logis on http://www.LogiLogi.org from
5
- any application.
6
-
7
- LLRemote is a library by the LogiLogi Foundation
8
- (http://foundation.logilogi.org).
9
-
10
- == Usage
11
-
12
- First require it.
13
-
14
- $ irb
15
-
16
- > require 'rubygems'
17
- > require 'llremote'
18
-
19
- First set it up for connecting
20
-
21
- > LLRemote.setup(:access_token => <your API access token>)
22
-
23
- Then initialize the remote logi
24
-
25
- > logi = LLRemote::Logi.new(
26
- > :link => "Interesting/New",
27
- > :title => "My shiny new Logi",
28
- > :body => "New things come about...")
29
-
30
- And save it.
31
-
32
- > logi.save
33
-
34
- It's that easy.
35
-
36
- == Installation
37
-
38
- LogiLogi Remote requires rAtom, which requires libxml-ruby, in ubuntu
39
- it is installed with apt-get install libxml2.
40
-
41
- rAtom is a gem, which is pulled in automatically if you install
42
- llremote.
43
-
44
- Then you can install LogiLogi Remote with the following command:
45
-
46
- % [sudo] gem install llremote
47
-
48
- The latest version of LogiLogi Remote can also be downloaded at:
49
-
50
- * http://rubyforge.org/frs/?group_id=8494
51
-
52
- And then from its distribution directory installed with:
53
-
54
- % [sudo] ruby install.rb
55
-
56
- == Support
57
-
58
- The LogiLogi Remote homepage is http://textweaver.rubyforge.org.
59
-
60
- For the latest news on LogiLogi Remote:
61
-
62
- * http://foundation.logilogi.org/tags/LLRemote
63
-
64
- Feel free to submit commits or feature requests. If you send a patch,
65
- remember to update the corresponding unit tests.
66
-
67
- == This Documentation
68
-
69
- This documentation can be browsed online at:
70
-
71
- * http://llremote.rubyforge.org
72
-
73
- == Copyrights
74
-
75
- LogiLogi Remote and these docs are Copyright (c) 2006-2009 The LogiLogi
76
- Foundation. LLRemote is licensed under the {GNU Lesser General Public
77
- License}[http://www.gnu.org/licenses/lgpl-3.0-standalone.html].
78
- These docs are available under the {Creative Commons Attribution-Share
79
- Alike License}[http://creativecommons.org/licenses/by-sa/3.0/].
80
-
81
- You can use LLRemote in an application that is not Free Software
82
- but LLRemote itself remains Free Software.
data/install.rb DELETED
@@ -1,30 +0,0 @@
1
- require 'rbconfig'
2
- require 'find'
3
- require 'ftools'
4
-
5
- include Config
6
-
7
- # this was adapted from rdoc's install.rb by way of Log4r
8
-
9
- $sitedir = CONFIG["sitelibdir"]
10
- unless $sitedir
11
- version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
12
- $libdir = File.join(CONFIG["libdir"], "ruby", version)
13
- $sitedir = $:.find {|x| x =~ /site_ruby/ }
14
- if !$sitedir
15
- $sitedir = File.join($libdir, "site_ruby")
16
- elsif $sitedir !~ Regexp.quote(version)
17
- $sitedir = File.join($sitedir, version)
18
- end
19
- end
20
-
21
- # the actual gruntwork
22
- Dir.chdir("lib")
23
-
24
- Find.find("l_l_remote", "l_l_remote.rb") { |f|
25
- if f[-3..-1] == ".rb"
26
- File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true)
27
- else
28
- File::makedirs(File.join($sitedir, *f.split(/\//)))
29
- end
30
- }
@@ -1,19 +0,0 @@
1
- #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
3
- #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
11
- #++#
12
-
13
- class LLRemote::Path < ActiveResource::Base
14
- def self.setup
15
- self.site = LLRemote.server_url + "/do/"
16
- self.user = LLRemote.access_token
17
- self.element_name = "path"
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
3
- #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
11
- #++#
12
-
13
- class LLRemote::Step < ActiveResource::Base
14
- def self.setup
15
- self.site = LLRemote.server_url + "/do/"
16
- self.user = LLRemote.access_token
17
- self.element_name = "step"
18
- end
19
- end
@@ -1,23 +0,0 @@
1
- #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
3
- #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
11
- #++#
12
-
13
- require File.dirname(__FILE__) + '/test_helper.rb'
14
-
15
- class LLRemoteTest < Test::Unit::TestCase
16
- ### Initialization
17
-
18
- def test_initialize
19
- LLRemote.setup(:access_token => "Moo", :server_url => "http://bod.com")
20
- assert_equal "Moo", LLRemote.access_token
21
- assert_equal "http://bod.com", LLRemote.server_url
22
- end
23
- end
data/test/logi_test.rb DELETED
@@ -1,24 +0,0 @@
1
- #--#
2
- # Copyright: (c) 2009 The LogiLogi Foundation <foundation@logilogi.org>
3
- #
4
- # License:
5
- # This file is part of the LLRemote Library. LLRemote is Free
6
- # Software. You can run/distribute/modify LLRemote under the terms
7
- # of the GNU Lesser General Public License version 3. This license
8
- # states that you can use LLRemote in applications that are not Free
9
- # Software but LLRemote itself remains Free Software. (LICENSE contains
10
- # the full text of the legally binding license).
11
- #++#
12
-
13
- require File.dirname(__FILE__) + '/test_helper.rb'
14
-
15
- class LogiTest < Test::Unit::TestCase
16
- ### Initialization
17
-
18
- def test_initialize
19
- l = LLRemote::Logi.new(:link => "a", :title => "b", :body => "c")
20
- assert_equal "a", l.link
21
- assert_equal "b", l.title
22
- assert_equal "c", l.body
23
- end
24
- end
data/test/test_helper.rb DELETED
@@ -1,3 +0,0 @@
1
- require 'stringio'
2
- require 'test/unit'
3
- require File.dirname(__FILE__) + '/../lib/l_l_remote'