···33- added YARD documentation
44- added explicit `base64` dependency in gemspec
55- added `MAX_LIMIT` (100) and `DEFAULT_LIMIT` (50) constants
66+- removed the length limit on feed rkeys, since it isn't actually limited to 15
67- removed deprecated options `enable_unsafe_auth` and `validate_responses`
78- fixed `rake:publish` not working with feed `description` is nil (thx @jthigpen)
89- `rake:publish` shows a better error message when `createSession` requires a 2FA token
+1-1
README.md
···2929- `publisher_did` – DID identifier of the account that you will publish the feed on (the string that starts with `did:plc:...`)
3030- `hostname` – the hostname on which the feed service will be run
31313232-You also need to configure at least one feed by passing a feed key and a feed object. The key is the identifier (rkey) that will appear at the end of the feed URI – it must only contain characters that are valid in URLs (preferably all lowercase) and it can't be longer than 15 characters. The feed object is anything that implements the single required method `get_posts` (could be a class, a module or an instance).
3232+You also need to configure at least one feed by passing a feed key and a feed object. The key is the identifier (rkey) that will appear at the end of the feed URI – it must only contain characters that are valid in URLs (preferably all lowercase) and it should be rather short. The feed object is anything that implements the single required method `get_posts` (could be a class, a module or an instance).
33333434So a simple setup could look like this:
3535
-1
lib/blue_factory/modules/feeds.rb
···7676 def validate_key(key)
7777 raise ConfigurationError, "Key must be a string (got: #{key.inspect})" unless key.is_a?(String)
7878 raise ConfigurationError, "Key must not be empty" if key == ''
7979- raise ConfigurationError, "Key must not be longer than 15 characters (got: #{key.inspect})" if key.length > 15
8079 raise ConfigurationError, "Key #{key.inspect} contains invalid characters" if key !~ RKEY_REGEXP
8180 end
8281
+6-1
spec/feeds_spec.rb
···3434 { blue: true },
3535 ['a', 'b'],
3636 '',
3737- 'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch',
3837 'blue sky',
3938 'gnu/linux',
4039 'ohno!',
···4544 bad_keys.each do |key|
4645 expect { BlueFactory.add_feed(key, TestFeed.new) }.to raise_error(BlueFactory::ConfigurationError)
4746 end
4747+ end
4848+4949+ it 'should not raise an error for very long keys' do
5050+ name = 'Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch'
5151+5252+ expect { BlueFactory.add_feed(name, TestFeed.new) }.to_not raise_error
4853 end
49545055 it "should raise an error when the feed doesn't have a get_posts method" do