compostr 0.1.1 → 0.1.2

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: 31dc61ca4c978bbdc7ac6241dd34923dd42cd3c4
4
- data.tar.gz: 32990bd5afbe8572a18fee1da267047d8bb380eb
3
+ metadata.gz: 502575895cdf999e84d5058302eb6a964a924a7d
4
+ data.tar.gz: 8513205b1925cb4e3e24da3c7a0f4a8db0e90f9c
5
5
  SHA512:
6
- metadata.gz: 2b6a2023871a90cb57a6a18a905b8cf4d401b65bb7885fb7583d147550d93a40c1491fa05e746fc37412338cfbd274f0937f2dec66c6c85433fd1e548819ade1
7
- data.tar.gz: d7931358749cda25caadef2a5aae4ce12b81c327eb71dc3661d3c8ebe1da7e254970b8d5fbfcad5ec6e1476f76cdbee33c2b0e614ac7c53bc53715d335c7da17
6
+ metadata.gz: 12b8c27e1a2be6484e3879a4f7655e53b5c954494fddc9824dd66d79f6665428404a215d4f627e1afce73e9323ba98fcb9af2a6f9caebffa9211088516c3e921
7
+ data.tar.gz: 5328423341c639bc15b0006f262db56b884dfa501bc41ba45258a2000f09e84cc5ed18fc333ec3f866134c44408d59d2de531a63227b248cc50a00f5687e656a
@@ -16,14 +16,15 @@ module Compostr
16
16
  # Returns attachment id of an image already uploaded
17
17
  # or attachment_id of image after fresh upload
18
18
  # (or nil if path empty)
19
+ # path is relative path to file to upload.
19
20
  def process rel_path, wp_event=nil
20
21
  return nil if rel_path.to_s.strip.empty?
21
- return nil if @image_store.nil?
22
22
 
23
23
  # Do we need URI encoding here?
24
24
  if attachment_id = @media_cache.id_of_name(rel_path)
25
25
  Compostr.logger.debug "Image already uploaded."
26
26
  else
27
+ return nil if @image_store.nil?
27
28
  path = File.join(@image_store, rel_path)
28
29
  Compostr.logger.info "Uploading file #{path}"
29
30
  upload = Compostr::ImageUpload.new(path)
@@ -20,11 +20,11 @@ module Compostr
20
20
  #
21
21
  # The post will be identified by uuid (or not).
22
22
  #
23
- # new_post_content
23
+ # new_post_content (a CustomPostType)
24
24
  # The data that **should** be in wordpress (without knowing
25
25
  # of wordpress post or custom field ids). Usually descendant of CustomPostType.
26
26
  #
27
- # old_post
27
+ # old_post (a hash)
28
28
  # The data currently available in wordpress (including
29
29
  # wordpress post id, custom field ids).
30
30
  def merge_push new_post, old_post
@@ -1,3 +1,3 @@
1
1
  module Compostr
2
- VERSION = "0.1.1".freeze
2
+ VERSION = "0.1.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compostr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Wolfsteller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-06 00:00:00.000000000 Z
11
+ date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubypress