spree_api 3.0.7 → 3.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbda7887dfa7d7a776b03b2d03574fea3153e999
|
4
|
+
data.tar.gz: 5ea3ab8b84b821fc85745d297f8002221a62cc22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f18eadb85c68b6178c38d47e9a7c9fee55251a3f4eaaa4197a110d9055d7292b6ed39dd6db5aa1b939cf57bd0318de2fb54d8005f276085e9eeb4e37ef375755
|
7
|
+
data.tar.gz: 229f57d3289dadb634efb239d5bbb80c2843b5513a0a240f14103a56380b51932d1e6327066116be038e32f0561e866f9b863d16d1ea2c5092e7114b9c179050
|
data/Rakefile
CHANGED
@@ -1,27 +1,13 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/testtask'
|
4
|
-
require 'rake/packagetask'
|
5
|
-
require 'rubygems/package_task'
|
6
4
|
require 'rspec/core/rake_task'
|
7
5
|
require 'spree/testing_support/common_rake'
|
8
6
|
require 'rails/all'
|
9
7
|
|
10
|
-
Bundler::GemHelper.install_tasks
|
11
8
|
RSpec::Core::RakeTask.new
|
12
9
|
|
13
|
-
|
14
|
-
Gem::PackageTask.new(spec) do |p|
|
15
|
-
p.gem_spec = spec
|
16
|
-
end
|
17
|
-
|
18
|
-
desc "Release to gemcutter"
|
19
|
-
task :release do
|
20
|
-
version = File.read(File.expand_path("../../SPREE_VERSION", __FILE__)).strip
|
21
|
-
cmd = "cd pkg && gem push spree_api-#{version}.gem"; puts cmd; system cmd
|
22
|
-
end
|
23
|
-
|
24
|
-
task :default => :spec
|
10
|
+
task default: :spec
|
25
11
|
|
26
12
|
desc "Generates a dummy app for testing"
|
27
13
|
task :test_app do
|
@@ -5,7 +5,7 @@ module Spree
|
|
5
5
|
|
6
6
|
include Spree::Core::ControllerHelpers::Auth
|
7
7
|
include Spree::Core::ControllerHelpers::Order
|
8
|
-
# This
|
8
|
+
# This before_action comes from Spree::Core::ControllerHelpers::Order
|
9
9
|
skip_before_action :set_current_order
|
10
10
|
|
11
11
|
def next
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
module Api
|
3
3
|
class PromotionsController < Spree::Api::BaseController
|
4
|
-
|
5
|
-
|
4
|
+
before_action :requires_admin
|
5
|
+
before_action :load_promotion
|
6
6
|
|
7
7
|
def show
|
8
8
|
if @promotion
|
@@ -12,7 +12,7 @@ module Spree
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
private
|
15
|
+
private
|
16
16
|
def requires_admin
|
17
17
|
return if @current_user_roles.include?("admin")
|
18
18
|
unauthorized and return
|
data/spree_api.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
version
|
2
|
+
require_relative '../core/lib/spree/core/version.rb'
|
3
3
|
|
4
|
-
Gem::Specification.new do |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.authors = ["Ryan Bigg"]
|
6
|
+
s.email = ["ryan@spreecommerce.com"]
|
7
|
+
s.description = %q{Spree's API}
|
8
|
+
s.summary = %q{Spree's API}
|
9
|
+
s.homepage = 'https://spreecommerce.com'
|
10
|
+
s.license = 'BSD-3'
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
s.files = `git ls-files`.split($\)
|
13
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
14
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
15
|
+
s.name = "spree_api"
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.version = Spree.version
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
s.add_dependency 'spree_core', s.version
|
20
|
+
s.add_dependency 'rabl', '~> 0.11.6'
|
21
|
+
s.add_dependency 'versioncake', '~> 2.3.1'
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.0.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.0.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rabl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|