neoneo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.1.1 / 2008-10-24
2
+
3
+ * Major Bugfix
4
+
5
+ * Gem wasn't working! Fixed relations!
6
+
1
7
  === 0.1.0 / 2008-10-23
2
8
 
3
9
  * Initial Release
data/Manifest.txt CHANGED
@@ -2,6 +2,8 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ lib/hpricot_extensions.rb
5
6
  lib/neoneo.rb
6
- spec/spec_helper.rb
7
+ lib/utils.rb
7
8
  spec/neoneo_spec.rb
9
+ spec/spec_helper.rb
@@ -0,0 +1,13 @@
1
+ module Hpricot
2
+ class Text
3
+ def clean
4
+ self.to_s.chomp.strip
5
+ end
6
+ end
7
+
8
+ class Elem
9
+ def clean
10
+ innerText.chomp.strip
11
+ end
12
+ end
13
+ end
data/lib/neoneo.rb CHANGED
@@ -1,16 +1,33 @@
1
- $LOAD_PATH << File.dirname(__FILE__)
1
+ require 'rubygems'
2
+ require 'mechanize'
2
3
 
4
+ $: << File.dirname(__FILE__)
5
+
6
+ require 'hpricot_extensions'
7
+ require 'utils'
8
+
9
+ # Get access to No Kahuna (http://www.nokahuna.com/) from your Ruby code.
10
+ #
11
+ # Some usage examples:
12
+ #
13
+ # require 'rubygems'
14
+ # require 'neoneo'
15
+ #
16
+ # project = Neoneo::User.new('user name', 'password').projects.find('My Project')
17
+ # project.name = "Cool project"
18
+ # project.save
19
+ #
20
+ # p project.tasks.map {|t| t.name}
21
+ #
22
+ # project.categories.find('An existing Category').add_task("Cool new Task",
23
+ # :assign_to => 'Some Username')
24
+ #
25
+ # project.add_task("Another way to add a task and notify ANYONE ;)",
26
+ # :notify => project.members, :category => "Some Category")
3
27
  module Neoneo
4
- require 'rubygems'
5
- require 'mechanize'
6
-
7
- require 'hpricot_extensions'
8
- require 'utils'
9
-
10
-
11
28
  BASE_URL = 'http://nokahuna.com/'
12
29
  PROJECT_URL = "#{BASE_URL}projects/"
13
- VERSION = '0.1.0'
30
+ VERSION = '0.1.1'
14
31
 
15
32
  # A Neoneo::AuthenticationError is thrown whenever No Kahuna reports, that
16
33
  # you're not logged in properly.
@@ -231,8 +248,8 @@ module Neoneo
231
248
  # - :assign_to => 'Some User Name' OR some_member_object
232
249
  # - :notify => 'Some User Name' OR some_member_object OR an array of them
233
250
  # An example:
234
- # project = Neoneo::User.new('John Doe', 'god').projects.find('My Project')
235
- # project.add_task("A shiny new task",
251
+ # project = Neoneo::User.new('John Doe', 'god').projects.find('My Project')
252
+ # project.add_task("A shiny new task",
236
253
  # :assign_to => 'Bob Dillan',
237
254
  # :category => project.categories.first,
238
255
  # :notify => ['John Doe', project.members.last])
@@ -273,10 +290,10 @@ module Neoneo
273
290
  # Saves the project name and descriptions which you can set simply with
274
291
  # name= and description=
275
292
  # An example:
276
- # project = Neoneo::User.new('John Doe', 'god').projects.find('My Project')
277
- # project.name = 'BLA!'
278
- # project.description = 'New description'
279
- # project.save
293
+ # project = Neoneo::User.new('John Doe', 'god').projects.find('My Project')
294
+ # project.name = 'BLA!'
295
+ # project.description = 'New description'
296
+ # project.save
280
297
  def save
281
298
  page = user.agent.get(url('edit'))
282
299
  form = page.forms.last
data/lib/utils.rb ADDED
@@ -0,0 +1,11 @@
1
+ module Neoneo
2
+ module Utils
3
+ class URL
4
+ def self.url_unescape(string)
5
+ string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
6
+ [$1.delete('%')].pack('H*')
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neoneo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Thorben Schr\xC3\xB6der"
@@ -30,7 +30,7 @@ cert_chain:
30
30
  kX4sVHCM
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-10-23 00:00:00 +02:00
33
+ date: 2008-10-24 00:00:00 +02:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
@@ -68,9 +68,11 @@ files:
68
68
  - Manifest.txt
69
69
  - README.txt
70
70
  - Rakefile
71
+ - lib/hpricot_extensions.rb
71
72
  - lib/neoneo.rb
72
- - spec/spec_helper.rb
73
+ - lib/utils.rb
73
74
  - spec/neoneo_spec.rb
75
+ - spec/spec_helper.rb
74
76
  has_rdoc: true
75
77
  homepage:
76
78
  post_install_message:
metadata.gz.sig CHANGED
Binary file