yaccl 1.0.pre.alpha → 1.0.pre.alpha2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9199d278a1744c0fcfd31a290d40171fbba57a9d
4
- data.tar.gz: 40f3bae9069f48696fe544760a44b90bf263d9c2
3
+ metadata.gz: 9ff7a4a6aca93021fe40a4982b61fd27df22ee4f
4
+ data.tar.gz: fcdb6ac4bb4de4351cce0cce62f14e9437e01bae
5
5
  SHA512:
6
- metadata.gz: 0dc47bf5bb0cc9d71f5eb37fedc6f2dec2f204665d3d82bb0d2921583f225727136fb78c01d30f875fc69a32466ffadf6017d28eab17669886060dc035707d59
7
- data.tar.gz: fb01d554a6688a03804b950df00a72eafb3d01a461d42feae11265cdfd2046c70f891439a01fa44eab98f4b8f5c021bfa1392a13cb2b4bd1daf22be2d00694ad
6
+ metadata.gz: e2f32d54a5a8e1a71d01c3f93ac7ac5ab28ae7e38c2c6d3e3ff84dc854cb01f0928dceb17517102b90f8d0fc5aeca9eb6ead86a22f704d80943b13d5431593a3
7
+ data.tar.gz: 3ceebc2361d3ac2048873d7a70b401b6a4053dc70e0e412c80d58e5db401466b659f679b2542084a3228040553bcd68dbdc63887bbdcbfe8520e30a6586da198
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
1
  Gemfile.lock
2
-
3
2
  .idea
4
3
  *.iml
4
+ *.gem
@@ -4,9 +4,10 @@ module YACCL
4
4
  attr_reader :connection
5
5
 
6
6
  def initialize(raw, connection)
7
- raw.each do |key, value|
8
- class_eval "def #{key.underscore};'#{value}';end"
9
- class_eval "def #{key.gsub('repository', '').underscore};'#{value}';end"
7
+ @hash = raw
8
+ @hash.each_key do |key|
9
+ class_eval "def #{key.underscore};@hash['#{key}'];end"
10
+ class_eval "def #{key.gsub('repository', '').underscore};@hash['#{key}'];end" if key =~ /^repository/
10
11
  end
11
12
 
12
13
  @connection = connection
@@ -64,6 +65,10 @@ module YACCL
64
65
  Type.new(result, self)
65
66
  end
66
67
 
68
+ def has_type?(type_id)
69
+ types.map(&:id).include?(type_id)
70
+ end
71
+
67
72
  def create_type(type)
68
73
  result = connection.execute!({ cmisaction: 'createType',
69
74
  repositoryId: id,
data/lib/yaccl/server.rb CHANGED
@@ -33,5 +33,11 @@ module YACCL
33
33
  Repository.new(result[repository_id], connection)
34
34
  end
35
35
 
36
+ def has_repository?(repository_id)
37
+ result = connection.execute!
38
+
39
+ result.keys.include?(repository_id)
40
+ end
41
+
36
42
  end
37
43
  end
data/lib/yaccl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module YACCL
2
- VERSION = '1.0-alpha'
2
+ VERSION = '1.0-alpha2'
3
3
  end
data/lib/yaccl.rb CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  require 'yaccl/connection'
3
2
  require 'yaccl/server'
4
3
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaccl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.pre.alpha
4
+ version: 1.0.pre.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Geerts
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-19 00:00:00.000000000 Z
12
+ date: 2014-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus