trello-factory 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGRmN2JhYTY4YTdhYzMxZTNhNDMxOTQ5NWJiYTEwYjEwZGQzMzIxYg==
5
+ data.tar.gz: !binary |-
6
+ ZDUwYjA2OTg4NDI3NjI5M2E3YTkxMGEyYmU2N2FlMWRmZmY0OGU0Mw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NzQ3ZTk2MmRhMWJkZWM3Mzc3MjVmY2QzYzFhMDlmZjI5NDY2NzM4ZDg2NjE0
10
+ NzYwMTBlYWMzOWQxZmIzMGIxOTE0ZDA3Mjc4MzY2NGY5ZmZhMzI5ZGY5ZjYy
11
+ YjdhNmRjYzQ5MTE4NzZkNDY4OWMyNTZkYzE2ZTI0NTIzYjI0Yzc=
12
+ data.tar.gz: !binary |-
13
+ ZDMzYmY3NjYxNzNhOTYyOWNjOTBhNDNiMmFmMGExMWIxODJjNmVjYzc3MWE0
14
+ Zjg0MjZmYTMxMjViNTk2NmJjOGJlZWQ0ODhmMTJkNDcxYzg4NzNjYzg3ZTRj
15
+ YWE4M2Q3YTlhYTJlMDNiYzMxNmI3YmE5ZTIyZTQwYzUxODY1MDk=
@@ -0,0 +1,10 @@
1
+ module AgileTrello
2
+ class TrelloCredentials
3
+ attr_reader :public_key, :access_token
4
+
5
+ def initialize(public_key, access_token)
6
+ @public_key = public_key
7
+ @access_token = access_token
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,23 @@
1
+ require 'trello'
2
+
3
+ module AgileTrello
4
+ class TrelloFactory
5
+ include Trello
6
+ include Trello::Authorization
7
+
8
+ def create(trello_credentials)
9
+ Trello::Authorization.const_set :AuthPolicy, OAuthPolicy
10
+ OAuthPolicy.consumer_credential = OAuthCredential.new trello_credentials.public_key, 'SECRET'
11
+ OAuthPolicy.token = OAuthCredential.new trello_credentials.access_token, nil
12
+ TrelloRepository.new
13
+ end
14
+ end
15
+
16
+ class TrelloRepository
17
+ include Trello
18
+
19
+ def get_board(board_id)
20
+ Board.find board_id
21
+ end
22
+ end
23
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: trello-factory
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - iainjmitchell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-trello
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: peach
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description:
42
+ email: iainjmitchell@gmail.com
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - lib/TrelloCredentials.rb
48
+ - lib/TrelloFactory.rb
49
+ homepage: https://github.com/code-computerlove/trello-factory
50
+ licenses:
51
+ - MIT
52
+ metadata: {}
53
+ post_install_message:
54
+ rdoc_options: []
55
+ require_paths:
56
+ - lib
57
+ required_ruby_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ requirements: []
68
+ rubyforge_project:
69
+ rubygems_version: 2.2.2
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: Anti-corruption layer around conecting to a users trello boards
73
+ test_files: []