louxewtey-client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.redcar/tags ADDED
@@ -0,0 +1,12 @@
1
+ 1292671135
2
+ Client /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb class Client
3
+ LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey-client.rb module LouXewTey
4
+ LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb module LouXewTey
5
+ LouXewTey /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/configuration.rb module LouXewTey
6
+ SERVEUR /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/configuration.rb SERVEUR =
7
+ TestCase /home/hassane/ruby_apps/louxewtey-client/test/helper.rb class Test::Unit::TestCase
8
+ TestLouxewteyClient /home/hassane/ruby_apps/louxewtey-client/test/test_louxewtey-client.rb class TestLouxewteyClient
9
+ connect /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def connect( api_key, auth_key )
10
+ create_event /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def create_event( event={} )
11
+ get_list_of /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def get_list_of( resource="", format="xml" )
12
+ initialize /home/hassane/ruby_apps/louxewtey-client/lib/louxewtey/client.rb def initialize( api_key=nil,auth_key=nil )
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :production do
9
+ gem "rest-client"
10
+ end
11
+
12
+ group :development do
13
+ gem "rest-client"
14
+ gem "shoulda", ">= 0"
15
+ gem "bundler", "~> 1.0.0"
16
+ gem "jeweler", "~> 1.5.1"
17
+ gem "rcov", ">= 0"
18
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,24 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ git (1.2.5)
5
+ jeweler (1.5.1)
6
+ bundler (~> 1.0.0)
7
+ git (>= 1.2.5)
8
+ rake
9
+ mime-types (1.16)
10
+ rake (0.8.7)
11
+ rcov (0.9.9)
12
+ rest-client (1.6.1)
13
+ mime-types (>= 1.16)
14
+ shoulda (2.11.3)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ bundler (~> 1.0.0)
21
+ jeweler (~> 1.5.1)
22
+ rcov
23
+ rest-client
24
+ shoulda
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Hassane Moustapha
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,23 @@
1
+ = louxewtey-client
2
+
3
+ Client Ruby pour accéder et profiter des services de la plateforme LouXewTey.<br />
4
+ 1 -> Créer une application sur le site LouXewTey.
5
+ 2 -> Récupérer les clés : API_KEY et AUTH_KEY
6
+
7
+ Nous suivre Sur Twitter : @hassanemoustaph
8
+
9
+ == Contributing to louxewtey-client
10
+
11
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
12
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
13
+ * Fork the project
14
+ * Start a feature/bugfix branch
15
+ * Commit and push until you are happy with your contribution
16
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
17
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
18
+
19
+ == Copyright
20
+
21
+ Copyright (c) 2010 Hassane Moustapha. See LICENSE.txt for
22
+ further details.
23
+
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Lancer `bundle install` pour installer les gems requises "
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "louxewtey-client"
16
+ gem.homepage = "http://github.com/hkairi/louxewtey-client"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{LouXewTey Ruby Client}
19
+ gem.description = %Q{ Client Ruby pour accéder et profiter des services de la plateforme LouXewTey. }
20
+ gem.email = "hassanemoustapha@gmail.com"
21
+ gem.authors = ["Hassane Moustapha"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ require 'rcov/rcovtask'
37
+ Rcov::RcovTask.new do |test|
38
+ test.libs << 'test'
39
+ test.pattern = 'test/**/test_*.rb'
40
+ test.verbose = true
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "louxewtey-client #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,8 @@
1
+ require 'restclient'
2
+ require 'louxewtey/configuration.rb'
3
+ require 'louxewtey/client.rb'
4
+
5
+ module LouXewTey
6
+ # Ce client permet aux développeurs d'avoir accès à la plateforme LouXewTey
7
+ # Cette utilisation nécessite une api_key et une auth_key.
8
+ end
@@ -0,0 +1,29 @@
1
+ module LouXewTey
2
+ class Client
3
+ ####################################################################
4
+ def initialize( api_key=nil,auth_key=nil )
5
+ @api_key, @auth_key = api_key,auth_key
6
+ connect( @api_key, @auth_key )
7
+ end
8
+ ####################################################################
9
+ def create_event( event={} )
10
+ return "c'est fait"
11
+ end
12
+ ####################################################################
13
+ def get_list_of( resource="", format="xml" )
14
+ if %w(evenements hotels).include?( resource )
15
+ RestClient.get("#{SERVEUR}/#{resource}.#{format}")do |response,request|
16
+ return response.body if response.code.to_i == 200
17
+ end
18
+ end
19
+ nil
20
+ end
21
+ ####################################################################
22
+ private
23
+ def connect( api_key, auth_key )
24
+ @client = {}
25
+ return @client
26
+ end
27
+ ####################################################################
28
+ end
29
+ end
@@ -0,0 +1,3 @@
1
+ module LouXewTey
2
+ SERVEUR = "http://luxew.manybusiness.net"
3
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'louxewtey-client'
16
+
17
+ class Test::Unit::TestCase
18
+ end
File without changes
metadata ADDED
@@ -0,0 +1,154 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: louxewtey-client
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Hassane Moustapha
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-18 00:00:00 +00:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ type: :development
23
+ prerelease: false
24
+ name: rest-client
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
34
+ requirement: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ type: :development
37
+ prerelease: false
38
+ name: shoulda
39
+ version_requirements: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ requirement: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ type: :development
51
+ prerelease: false
52
+ name: bundler
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ hash: 23
59
+ segments:
60
+ - 1
61
+ - 0
62
+ - 0
63
+ version: 1.0.0
64
+ requirement: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ type: :development
67
+ prerelease: false
68
+ name: jeweler
69
+ version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ hash: 1
75
+ segments:
76
+ - 1
77
+ - 5
78
+ - 1
79
+ version: 1.5.1
80
+ requirement: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ type: :development
83
+ prerelease: false
84
+ name: rcov
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ hash: 3
91
+ segments:
92
+ - 0
93
+ version: "0"
94
+ requirement: *id005
95
+ description: " Client Ruby pour acc\xC3\xA9der et profiter des services de la plateforme LouXewTey. "
96
+ email: hassanemoustapha@gmail.com
97
+ executables: []
98
+
99
+ extensions: []
100
+
101
+ extra_rdoc_files:
102
+ - LICENSE.txt
103
+ - README.rdoc
104
+ files:
105
+ - .document
106
+ - .redcar/tags
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - LICENSE.txt
110
+ - README.rdoc
111
+ - Rakefile
112
+ - VERSION
113
+ - lib/louxewtey-client.rb
114
+ - lib/louxewtey/client.rb
115
+ - lib/louxewtey/configuration.rb
116
+ - test/helper.rb
117
+ - test/test_louxewtey-client.rb
118
+ has_rdoc: true
119
+ homepage: http://github.com/hkairi/louxewtey-client
120
+ licenses:
121
+ - MIT
122
+ post_install_message:
123
+ rdoc_options: []
124
+
125
+ require_paths:
126
+ - lib
127
+ required_ruby_version: !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ hash: 3
133
+ segments:
134
+ - 0
135
+ version: "0"
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ hash: 3
142
+ segments:
143
+ - 0
144
+ version: "0"
145
+ requirements: []
146
+
147
+ rubyforge_project:
148
+ rubygems_version: 1.3.7
149
+ signing_key:
150
+ specification_version: 3
151
+ summary: LouXewTey Ruby Client
152
+ test_files:
153
+ - test/helper.rb
154
+ - test/test_louxewtey-client.rb