effective_qb_sync 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/admin/qb_syncs/instructions.html.haml +1 -1
- data/{lib/generators/templates → config}/effective_qb_sync.rb +0 -0
- data/lib/effective_qb_sync/engine.rb +1 -1
- data/lib/effective_qb_sync/version.rb +1 -1
- data/lib/generators/effective_qb_sync/install_generator.rb +5 -5
- metadata +5 -6
- data/README.md +0 -94
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6dcb0e0120dd9e4b6342c70b92c8bca2f62f294
|
4
|
+
data.tar.gz: 9e02bcdb643ca2a9b739103760b5230ecf03c9d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87c3181e5a2a5ac511d05eed4945ae7ea8bcdcb5365d75adf8fc9cd644c99831bef9264ff4a801aaed290e6afd0be4f5b87811eab2340f959aed4e53101b5472
|
7
|
+
data.tar.gz: 04083b292746df10f66f27f961266f0e2891db183cdb461ad36d6438564d6e6e26496daab56bd2d98dca9e50b4c4283e03582bf4b9b38ef221bd8d049fbdbfc4
|
@@ -112,7 +112,7 @@
|
|
112
112
|
url that ends with
|
113
113
|
%strong= effective_qb_sync.qb_sync_path
|
114
114
|
such as
|
115
|
-
%strong https://myapp.
|
115
|
+
%strong https://myapp.herokuapp.com#{effective_qb_sync.qb_sync_path}
|
116
116
|
%li The AppSupport url doesn't matter
|
117
117
|
%li The UserName must be present and match an existing user
|
118
118
|
%li The OwnerID and FileID values must also be unique between all other .qwc files
|
File without changes
|
@@ -6,7 +6,7 @@ module EffectiveQbSync
|
|
6
6
|
|
7
7
|
# Set up our default configuration options.
|
8
8
|
initializer "effective_qb_sync.defaults", before: :load_config_initializers do |app|
|
9
|
-
eval File.read("#{config.root}/
|
9
|
+
eval File.read("#{config.root}/config/effective_qb_sync.rb")
|
10
10
|
end
|
11
11
|
|
12
12
|
# Ensure every acts_as_purchasable object responds to qb_item_name
|
@@ -3,20 +3,20 @@ module EffectiveQbSync
|
|
3
3
|
class InstallGenerator < Rails::Generators::Base
|
4
4
|
include Rails::Generators::Migration
|
5
5
|
|
6
|
-
desc
|
6
|
+
desc 'Creates an EffectiveQbSync initializer in your application.'
|
7
7
|
|
8
|
-
source_root File.expand_path(
|
8
|
+
source_root File.expand_path('../../templates', __FILE__)
|
9
9
|
|
10
10
|
def self.next_migration_number(dirname)
|
11
11
|
if not ActiveRecord::Base.timestamped_migrations
|
12
|
-
Time.new.utc.strftime(
|
12
|
+
Time.new.utc.strftime('%Y%m%d%H%M%S')
|
13
13
|
else
|
14
|
-
|
14
|
+
'%.3d' % (current_migration_number(dirname) + 1)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
def copy_initializer
|
19
|
-
template
|
19
|
+
template ('../' * 3) + 'config/effective_qb_sync.rb', 'config/initializers/effective_qb_sync.rb'
|
20
20
|
end
|
21
21
|
|
22
22
|
def copy_mailer_preview
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_qb_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
name: effective_orders
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 2.0.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 2.0.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
@@ -228,7 +228,6 @@ extensions: []
|
|
228
228
|
extra_rdoc_files: []
|
229
229
|
files:
|
230
230
|
- MIT-LICENSE
|
231
|
-
- README.md
|
232
231
|
- Rakefile
|
233
232
|
- app/controllers/admin/qb_syncs_controller.rb
|
234
233
|
- app/controllers/effective/qb_sync_controller.rb
|
@@ -256,13 +255,13 @@ files:
|
|
256
255
|
- app/views/effective/qb_sync/sendRequestXML.erb
|
257
256
|
- app/views/effective/qb_sync/serverVersion.erb
|
258
257
|
- app/views/effective/qb_web_connector/quickbooks.qwc.erb
|
258
|
+
- config/effective_qb_sync.rb
|
259
259
|
- config/routes.rb
|
260
260
|
- db/migrate/01_create_effective_qb_sync.rb.erb
|
261
261
|
- lib/effective_qb_sync.rb
|
262
262
|
- lib/effective_qb_sync/engine.rb
|
263
263
|
- lib/effective_qb_sync/version.rb
|
264
264
|
- lib/generators/effective_qb_sync/install_generator.rb
|
265
|
-
- lib/generators/templates/effective_qb_sync.rb
|
266
265
|
- lib/generators/templates/effective_qb_sync_mailer_preview.rb
|
267
266
|
- spec/dummy/README.rdoc
|
268
267
|
- spec/dummy/Rakefile
|
data/README.md
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
# Effective Quickbooks Sync
|
2
|
-
|
3
|
-
Synchronize [effective_orders](https://github.com/code-and-effect/effective_orders) with [Quickbooks Web Connector](https://developer.intuit.com/docs/quickbooks_web_connector).
|
4
|
-
|
5
|
-
## Getting Started
|
6
|
-
|
7
|
-
Make sure [effective_orders](https://github.com/code-and-effect/effective_orders) is installed.
|
8
|
-
|
9
|
-
Ensure all your `acts_as_purchasable` objects respond to `qb_item_name`.
|
10
|
-
|
11
|
-
|
12
|
-
Add to your Gemfile:
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
gem 'effective_qb_sync'
|
16
|
-
```
|
17
|
-
|
18
|
-
Run the bundle command to install it:
|
19
|
-
|
20
|
-
```console
|
21
|
-
bundle install
|
22
|
-
```
|
23
|
-
|
24
|
-
Then run the generator:
|
25
|
-
|
26
|
-
```ruby
|
27
|
-
rails generate effective_qb_sync:install
|
28
|
-
```
|
29
|
-
|
30
|
-
The generator will install an initializer which describes all configuration options and creates a database migration.
|
31
|
-
|
32
|
-
If you want to tweak the table name (to use something other than the default 'qb_requests', 'qb_tickets', 'qb_logs' and 'qb_order_items'), manually adjust both the configuration file and the migration now.
|
33
|
-
|
34
|
-
Then migrate the database:
|
35
|
-
|
36
|
-
```ruby
|
37
|
-
rake db:migrate
|
38
|
-
```
|
39
|
-
|
40
|
-
### Admin Screen
|
41
|
-
|
42
|
-
To use the Admin screen, please also install the effective_datatables gem:
|
43
|
-
|
44
|
-
```ruby
|
45
|
-
gem 'effective_datatables'
|
46
|
-
```
|
47
|
-
|
48
|
-
Then visit:
|
49
|
-
|
50
|
-
```ruby
|
51
|
-
link_to 'Quickbooks', effective_qb_sync.admin_qb_syncs_path # /admin/qb_syncs
|
52
|
-
```
|
53
|
-
|
54
|
-
### Permissions
|
55
|
-
|
56
|
-
The Quickbooks synchronization controller does not require a logged in user, or any other rails permissions.
|
57
|
-
|
58
|
-
The sync itself checks that the Quickbooks user performing the sync has a username/password that matches the values in the config/initializers/effective_qb_sync.rb file.
|
59
|
-
|
60
|
-
For the admin screen, a logged in user is required (devise) and the user should be able to (CanCan):
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
can :admin, :effective_qb_sync
|
64
|
-
```
|
65
|
-
|
66
|
-
Devise is a required dependency, but CanCan is not. Please see the authorization_method in the initializer.
|
67
|
-
|
68
|
-
## Setting up Quickbooks
|
69
|
-
|
70
|
-
Once the gem is installed, visit the /admin/qb_syncs/instructions page for setup instructions.
|
71
|
-
|
72
|
-
## License
|
73
|
-
|
74
|
-
MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
|
75
|
-
|
76
|
-
Code and Effect is the product arm of [AgileStyle](http://www.agilestyle.com/), an Edmonton-based shop that specializes in building custom web applications with Ruby on Rails.
|
77
|
-
|
78
|
-
## Testing
|
79
|
-
|
80
|
-
Run tests by:
|
81
|
-
|
82
|
-
```ruby
|
83
|
-
rspec
|
84
|
-
```
|
85
|
-
|
86
|
-
## Contributing
|
87
|
-
|
88
|
-
1. Fork it
|
89
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
90
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
91
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
92
|
-
5. Bonus points for test coverage
|
93
|
-
6. Create new Pull Request
|
94
|
-
|